このコードは、純粋な Java アプリケーションで正常に実行されます。
Connection conn = null;
Statement inst;
try {
Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance ();
conn = DriverManager.getConnection("jdbc:sqlserver://192.168.1.100\\MSSQLSERVER:1433;DatabaseName=Prueba", "sa", "sa1234");
inst = conn.createStatement();
inst.executeUpdate("INSERT INTO TIENDAS(NOMBRE) VALUES ('ZZZZZZZ') ");
} catch (Exception e) {
e.printStackTrace();
}
}
しかし、Android プロジェクトでは'Socket closed'というエラーが発生します。
私はEclipse Heliosを使用しています。
誰か助けてくれませんか?