Page 1 of 1

Database Plugin Version

Posted: Fri Oct 19, 2012 1:41 pm
by Guimauve
Hello everyone,

The command for Database are little bit limited specially with SQLite. Furthermore when I read something like this :
After ADD COLUMN has been run on a database, that database will not be readable by SQLite version 3.1.3 and earlier.
Source : http://www.sqlite.org/lang_altertable.html

And I don't know the version used by PureBasic in background, I feel little bit nervous. So it is possible to add a command to return the Database Plugin Version as string or at least indicate in the UseSQLiteDatabase() help page the version of SQLite used by the plugin. I think this can be a very useful information.

Best regards
Guimauve

Re: Database Plugin Version

Posted: Fri Oct 19, 2012 1:57 pm
by Kiffi
Guimauve wrote:So it is possible to add a command to return the Database Plugin Version as string

Code: Select all

UseSQLiteDatabase()

Procedure.s GetSQLiteVersion()
  OpenDatabase(0, ":memory:", "", "", #PB_Database_SQLite)
  DatabaseQuery(0, "Select sqlite_version()")
  NextDatabaseRow(0)
  ProcedureReturn GetDatabaseString(0,0)
EndProcedure

Debug GetSQLiteVersion()
Greetings ... Kiffi

Re: Database Plugin Version

Posted: Fri Oct 19, 2012 2:09 pm
by Guimauve
Hello,

@Kiffi : Thanks for the code snippet it will be useful.

I have found the information here : http://www.purebasic.fr/english/viewtop ... 7&p=381341

A native command to do this can be a great addition.

Best regards
Guimauve