Skip to content
tajmone edited this page Feb 19, 2017 · 2 revisions
PureBASIC 5.51
SQLite version: 3.13.0 (2016-05-18)

SQLite

External Links

Code Hack: Get SQLite Version

This code displays which version of the SQLite library is used by the current PureBASIC release:

; PureBASIC 5.50
; posted by StarBootics (October 4, 2016):
; http://www.purebasic.fr/english/viewtopic.php?f=3&t=66706

Procedure.s GetSQLiteVersion()
  
  Protected DatabaseHandle.i = OpenDatabase(#PB_Any, ":memory:", "", "", #PB_Database_SQLite)
  DatabaseQuery(DatabaseHandle, "SELECT sqlite_version()")
  NextDatabaseRow(DatabaseHandle)
  Protected SQLite_Version.s = GetDatabaseString(DatabaseHandle, 0)
  FinishDatabaseQuery(DatabaseHandle)
  CloseDatabase(DatabaseHandle)
  
  ProcedureReturn SQLite_Version
EndProcedure

CompilerIf #PB_Compiler_IsMainFile
  
  UseSQLiteDatabase()
  Debug GetSQLiteVersion()
  
CompilerEndIf
Clone this wiki locally