Where do I find the version of SQLite used by PB?

Everything else that doesn't fall into one of the other PB categories.
swhite
Enthusiast
Enthusiast
Posts: 727
Joined: Thu May 21, 2009 6:56 pm

Where do I find the version of SQLite used by PB?

Post by swhite »

Hi

I have been searching for information about the version of SQLite included with PB. Does anyone know where to find this information? Similarly is they a way to find out the versions of other libraries included with PB. It would be nice if these versions where listed in the documentation with each release of PB.

Thanks,
Simon
Simon White
dCipher Computing
User avatar
spikey
Enthusiast
Enthusiast
Posts: 586
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Where do I find the version of SQLite used by PB?

Post by spikey »

Code: Select all

SELECT sqlite_version();
The resulting column is a string in x.x.x format.
User avatar
skywalk
Addict
Addict
Posts: 3995
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Where do I find the version of SQLite used by PB?

Post by skywalk »

Code: Select all

UseSQLiteDatabase()
dbn = OpenDatabase(#PB_Any, ":memory:", #Empty$, #Empty$, #PB_Database_SQLite)
DatabaseQuery(dbn, "Select sqlite_version();")
NextDatabaseRow(dbn)
Debug GetDatabaseString(dbn, 0)
FinishDatabaseQuery(dbn)
CloseDatabase(dbn)
Or more directly

Code: Select all

UseSQLiteDatabase()
ImportC ""    ; UseSQLiteDatabase() must be called prior
  sqlite3_libversion()
EndImport
Debug PeekS(sqlite3_libversion(), -1, #PB_Ascii)
EDIT: added ImportC stuff.
Last edited by skywalk on Mon Dec 31, 2018 10:30 pm, edited 1 time in total.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1252
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: Where do I find the version of SQLite used by PB?

Post by Paul »

skywalk wrote:Or more directly

Code: Select all

UseSQLiteDatabase()
Debug PeekS(sqlite3_libversion(), -1, #PB_Ascii)
Is this a 3rd party lib you are using?
sqlite3_libversion() doesn't seem to be a native PB command.
Image Image
User avatar
skywalk
Addict
Addict
Posts: 3995
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Where do I find the version of SQLite used by PB?

Post by skywalk »

Sorry, left out the following:
ImportC "" ; UseSQLiteDatabase() must be called prior
sqlite3_libversion()
EndImport
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply