• Welcome, Guest. Please login.
 
October 21, 2019, 03:17:03 am

News:

Welcome to the SQLitening support forums!


sql3_use always returns 0

Started by mikedoty, September 23, 2007, 01:59:32 am

Previous topic - Next topic

mikedoty

September 23, 2007, 01:59:32 am Last Edit: September 23, 2007, 03:08:31 am by mikedoty
errcode = sql3_Use(hSession, sDatabase)
errcode is 0 no matter the value in sDatabase.

Not to make up another thread

Does SQL3_CLOSE need to be implemented (and some of these others, below?)
Should close be used within a transaction?
Is there a newer server/client?

' Actions
%SQL3_STARTSESSION    = 100
%SQL3_ENDSESSION      = 110
%SQL3_USE             = 120
%SQL3_CLOSE           = 130
%SQL3_CONNECT         = 140
%SQL3_EXEC            = 150
%SQL3_SELECT          = 160
%SQL3_VALIDATEUSER    = 170
%SQL3_DISCONNECT      = 180
%SQL3_RSDESTROY       = 190
%SQL3_RSMOVEFIRST     = 200
%SQL3_RSMOVENEXT      = 210
%SQL3_RSMOVELAST      = 220
%SQL3_RSMOVEPREV      = 230
%SQL3_RSMOVETO        = 240
%SQL3_RSEOF           = 250
%SQL3_RSBOF           = 260
%SQL3_RSGET           = 270
%SQL3_RSGETAT         = 280
%SQL3_RSROWCOUNT      = 290
%SQL3_RSCOLCOUNT      = 300
%SQL3_RSCOLNAME       = 310     

Paul Squires

Thanks Mike, I'll have a new version of the client/server today so whatever issues you find please let me know so I can squeeze in the fixes before I upload the files. I will check into the sql3_use and the close stuff.

Paul Squires

Duh! I must have been a little brain dead when I replied to your post a little earlier today.

sql3_Use will not fail because if the database does not exist then it creates a new database. Internally, the call eventually ends up with the sqlite function sqlite3_open( szFileSpec, hDB ). The specs for that function indicate that it opens an existing database and, if not present, then creates a new database.

I added the sql3_Close function. It will be in the new upload. Currently, databases are automatically closed when the session ends or the application or sql3Client DLL unloads.



mikedoty

Thank you.  I do see extra .DB's.