2
このメッセージが表示されたら、New Host Connection established
は接続OKですか、そうではありませんか?HostConnection :: get()新しいホスト接続が確立されました0xafecbf90
私はAndroidの
私のアプリケーション上のローカルデータベースに接続しようとしていますtry {
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection(url, user, pass);
/* System.out.println("Databaseection success"); */
Log.i("MYLOG", "Message was not handled.1");
String result = "Database connection success\n";
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from depo");
ResultSetMetaData rsmd = rs.getMetaData();
Log.i("MYLOG", "Message was not handled.2");
while (rs.next()) {
result += rsmd.getColumnName(1) + ": " + rs.getInt(1) + "\n";
result += rsmd.getColumnName(2) + ": " + rs.getString(2) + "\n";
result += rsmd.getColumnName(3) + ": " + rs.getString(3) + "\n";
Log.i("MYLOG", "Message was not handled.3");
}
tv.setText(result);
} catch (Exception e) {
e.printStackTrace();
tv.setText(e.toString());
}
ログイン:
05-11 15:28:19.237 2337-2549/mysql.example.com.myapplication D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 05-11 15:28:19.243 2337: 2337 D/ ]
HostConnection::get() New Host Connection established 0xafecbf90, tid 2337
[ 05-11 15:28:19.574 2337: 2549 D/ ]
HostConnection::get() New Host Connection established 0xae3e7600, tid 2549
05-11 15:28:19.578 2337-2549/mysql.example.com.myapplication I/OpenGLRenderer: Initialized EGL, version 1.4