当前页面: 开发资料首页 → J2SE 专题 → 向数据库插入纪录出错
向数据库插入纪录出错
摘要: 向数据库插入纪录出错
我在向数据库里插入一个ArrayList,这个ArrayList里保存的是自定义的结构,刚开始好使,可我对ArrayList作了修改,删除了原来的纪录,在进行插入时,出错,不知什么原因?
m_prestat = m_connection.prepareStatement(
"insert into TOPLIST values (?,?)");
m_prestat.setString(1, td.m_strTop);
m_prestat.setObject(2, td.m_TitleList); //这句
m_prestat.executeUpdate();
m_prestat.close();
See com.borland.datastore.q2.QueryError error code: BASE+79
com.borland.datastore.q2.QueryError: [line 1, col 1] com.borland.datastore.jdbc.b
at com.borland.datastore.q2.QueryError.a(Unknown Source)
at com.borland.datastore.q2.QueryEngine.execute(Unknown Source)
at com.borland.datastore.driver.LDriverConnection.a(Unknown Source)
at com.borland.datastore.driver.LDriverStatement.executeUpdate(Unknown Source)
问题没描述清楚
"insert into TOPLIST values (?,?)");
m_prestat.setString(1, td.m_strTop);
m_prestat.setObject(2, td.m_TitleList); //这句
==========
形式上感觉是没有问题的
对象数据库?