Check SQLite version currently used by PB - generic way

Share your advanced PureBasic knowledge/code with the community.
Marlin
Enthusiast
Enthusiast
Posts: 406
Joined: Sun Sep 17, 2006 1:24 pm
Location: Germany

Check SQLite version currently used by PB - generic way

Post by Marlin »

You can use this as a simple, generic way to check what version of SQLite
your current version of PB uses:

Code: Select all

EnableExplicit

Debug UseSQLiteDatabase()

Debug OpenDatabase(0, ":memory:", "", "")

Debug DatabaseQuery(0, "select sqlite_version()")
Debug NextDatabaseRow(0)
Debug "PB currently uses SQLite version: " + GetDatabaseString(0, 0)
FinishDatabaseQuery(0)
CloseDatabase(0)
I find 3.6.23.1 -> supporting foreign keys,
while my installed commandline version 3.5.7 does not. :oops:
-> Time for updating. ;-)
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Check SQLite version currently used by PB - generic way

Post by IdeasVacuum »

Brilliant tip Marlin, thanks for sharing it :)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply