SQLite Errormessage "library routine called out of sequ

Just starting out? Need help? Post your questions and find answers here.
JoJo
New User
New User
Posts: 4
Joined: Thu Nov 13, 2003 11:33 am

SQLite Errormessage "library routine called out of sequ

Post 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
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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.
El_Choni
bcgreen
User
User
Posts: 33
Joined: Sun Nov 02, 2003 7:33 am
Location: Pullman, WA

Post 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
Post Reply