【发布时间】:2013-09-28 19:52:37
【问题描述】:
在我使用以下代码将 BLOB 值写入数据库之后:
// bb is of type ByteBuffer
Blob blob = new SerialBlob(bb.array());
sqlStatement = "UPDATE Words SET Examples=? WHERE Word=\"" + word + "\"";
// c is of type Connection
PreparedStatement pstmt = c.prepareStatement(sqlStatement);
pstmt.setBlob(1, blob);
pstmt.executeUpdate();
c.commit();
我收到以下错误:
java.sql.SQLException: SQLite JDBC 驱动没有实现
无论我从哪里下载此驱动程序,我的问题是您是否知道将 BLOB 值写入 SQLite 数据库的任何 SAFE 方法。
【问题讨论】:
-
Example 的值在哪里设置?