Hi
I'm getting the following error when trying to get some data from a SQLite DB:
Error occurred on line: 191 (DBUtils) - (Error points to the line with Dim rs as Resultset if I use that version)
java.lang.RuntimeException: Object should first be initialized
----------
I've tried it using the DBUtils functions and by calling the ExecQuery function of the SQL object directly:
lst = DBUtils.ExecuteList(Main.SQL1,"SELECT catname FROM Categories",Null,0)
&
DBUtils.ExecuteList2(Main.SQL1,"SELECT catname FROM Categories",Null,0,lst)
&
dim rs as ResultSet = Main.SQL1.ExecQuery("SELECT catname FROM Categories")
----------
The problem seems to be that it is expecting the Resultset to be initialized but it doesn't have a Initialized method.
The code to create the tables works fine as does the code to IINSERT INTO the Categories table (verified with SQLite Admin)
I'm using #AdditionalJar: sqlite-jdbc-3.7.2.
I've read through the the B4XSQLiteDatabase Guide and searched the forum but I can't see anything that talks about this error.
I'm getting the following error when trying to get some data from a SQLite DB:
Error occurred on line: 191 (DBUtils) - (Error points to the line with Dim rs as Resultset if I use that version)
java.lang.RuntimeException: Object should first be initialized
----------
I've tried it using the DBUtils functions and by calling the ExecQuery function of the SQL object directly:
lst = DBUtils.ExecuteList(Main.SQL1,"SELECT catname FROM Categories",Null,0)
&
DBUtils.ExecuteList2(Main.SQL1,"SELECT catname FROM Categories",Null,0,lst)
&
dim rs as ResultSet = Main.SQL1.ExecQuery("SELECT catname FROM Categories")
----------
The problem seems to be that it is expecting the Resultset to be initialized but it doesn't have a Initialized method.
The code to create the tables works fine as does the code to IINSERT INTO the Categories table (verified with SQLite Admin)
I'm using #AdditionalJar: sqlite-jdbc-3.7.2.
I've read through the the B4XSQLiteDatabase Guide and searched the forum but I can't see anything that talks about this error.
Last edited: