次のコードを使用して、Eclipse エミュレーター Android から SQL サーバーに接続しようとしています。
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
String driver = "net.sourceforge.jtds.jdbc.Driver";
Class.forName(driver).newInstance();
String connString = "jdbc:jtds:sqlserver://83.212.240.15:1521/hua;encrypt=false;user=xxxxxx;password=xxx;instance=SQLEXPRESS;";
String username = "xxxxx";
String password = "xxxxx";
conn = DriverManager.getConnection(connString,username,password);
Statement stmt = conn.createStatement();
ResultSet reset = stmt.executeQuery("insert into picture values('hi');");
conn.close();
しかし、データベースでは何も起こりません。何かアイデアはありますか?
よろしくお願いします