码迷,mamicode.com
首页 > 数据库 > 详细

MATLAB7 + sqlitejdbc-v056.jar 访问数据库

时间:2015-05-14 00:57:46      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:

以下代码出错:
conn=database(data.db,‘‘,‘‘,org.sqlite.JDBC,jdbc:sqlite:C:/MATLAB7/work/del_man_voice_from_wave/data.db);
% ping(conn);
% set(conn,AutoCommit,off);
exec(conn, create table mytst(id, name, score1, score2));
exec(conn, insert into mytst values(1,"zhangsan",88.5,90));
exec(conn, insert into mytst values(2,"lisi",98.5,92););
curs=exec(conn,select id,name from mytst)
disp aa
curs=fetch(curs);
% commit(conn);
??? Java exception occurred: 
java.lang.IllegalStateException: SQLite JDBC: inconsistent internal state

    at org.sqlite.RS.checkCol(RS.java:62)

    at org.sqlite.RS.getColumnCount(RS.java:319)

    at com.mathworks.toolbox.database.fetchTheData.maximumColumns(fetchTheData.java:174)
.

Error in ==> cursor.cols at 50
  columns = double(maximumColumns(cursor.Fetch,resultSetMetaData));

Error in ==> cursor.fetch at 120
          numberOfColumns = double(cols(cursor));

Error in ==> test_sqlite at 9
curs=fetch(curs);

解决的方法:

MATLAB7 + sqlitejdbc-v056.jar 访问数据库

标签:

原文地址:http://www.cnblogs.com/zhang-pengcheng/p/4502076.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!