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

以下代码出错:
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);

解决的方法:

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。