I'm using El_Choni's (impressive!) SQLite_133 User Lib and I'm getting the following error when I call SQLiteGetTable after closing and reopening the database:
SQLiteGetTable error: library routine called out of sequence
To test I took the sample program, SQLite.pb, and added the code (see below) at the end of the program between the calls to SQLiteClose() and DeleteFile(DBName$). Same error.
Any ideas? I need to open/close/copy/delete databases in an app so any help would be appreciated.
Thanks...
Fergal
; ===================================
; reopen db...
DBHandle = SQLiteOpen(DBName$)
If DBHandle = 0
MessageRequester("SQLite Error", "SQLiteOpen error: " + SQLiteError(), #MB_IconError | #MB_OK)
EndIf
; handle is good...
Result = SQLiteGetTable("SELECT id, url, site, category FROM bookmarks WHERE category LIKE 'D%'")
If Result <> #SQLITE_OK
; gives error: library routine called out of sequence
MessageRequester("SQLite Error", "SQLiteGetTable error: "+SQLiteError(Result), #MB_IconError|#MB_OK)
EndIf
SQLiteClose()
; ===================================
SQLite_133 Lib: Close/Reopen
RE: SQLite_133 Lib: Close/Reopen
OK... I see answer now:
DBIndex = 0
...
;reopen...
DBIndex + 1
DBHandle = SQLiteOpen(DBIndex, DBName$)
DBIndex = 0
...
;reopen...
DBIndex + 1
DBHandle = SQLiteOpen(DBIndex, DBName$)
