Page 1 of 1

SQLite Errormessage "library routine called out of sequ

Posted: Thu Nov 13, 2003 11:39 am
by JoJo
Here a short programme code like the one in my programme:

#DB=0

InitSQLite()

DBHandle=SQLiteOpen(#DB,"test1.db")
Query$="create table status(name text);"
result=SQLiteExec(Query$)
Debug SQLiteError(result)
SQLiteClose(#DB)

DBHandle=SQLiteOpen(#DB,"test2.db")
Query$="create table status(name text);"
result=SQLiteExec(Query$)
Debug SQLiteError(result)
SQLiteClose(#DB)

DeleteFile("test1.db")
DeleteFile("test2.db")

Can someone tell please why this doesn't work ?

I have no idea where to look anymore.

Thanks

Posted: Thu Nov 13, 2003 1:35 pm
by Karbon
I think El_Choni mentioned that there was a bug in the userlib. I think you're running into it here. He said he was going to post a new version..

Posted: Thu Nov 13, 2003 1:40 pm
by El_Choni
It's a known bug and it will be fixed in the next version. For now, don't reuse any database index, that is: use index 1 for the second database you open.

The funny thing is, your code is working here, I don't know why.

Posted: Fri Nov 14, 2003 12:53 am
by bcgreen
Yep, that's the same bug I reported. For every database you open, you need to use a new database ID#, rather than reusing the same ID# over and over....

Bryan