/*从该网站下载 http://www.ch-werner.de/javasqlite/*/
/*导入其中的jar包,并把dll文件放在程序同级目录即可*/
try {
Class clz = Class.forName("SQLite.JDBCDriver");
Connection conn = DriverManager.getConnection("jdbc:sqlite:/"+System.getProperty("user.dir")+"/RTCProfileStore.db");
String sql = "select MSG_INFO1 from SESSION_MESSAGE_HISTORY ";
PreparedStatement pst = conn.prepareStatement(sql);
ResultSet rs = pst.executeQuery();
if(rs.next()){
InputStream is = null;
is = rs.getBinaryStream("MSG_INFO1");
JOptionPane.showMessageDialog(this, "ok");
}
} catch (SQLException ex) {
Logger.getLogger(MainLocal.class.getName()).log(Level.SEVERE, null, ex);
JOptionPane.showMessageDialog(null, ex.getMessage());
} catch (ClassNotFoundException ex) {
Logger.getLogger(MainLocal.class.getName()).log(Level.SEVERE, null, ex);
JOptionPane.showMessageDialog(null, ex.getMessage());
}