UseSQLiteDatabase()
Syntax
UseSQLiteDatabase()Description
Initialize the SQLite database environment for future use.
Parameters
None.
Return value
None.
Remarks
SQLite is a file based, serverless database manager. There is no driver or additional files to install, all is ready to use. SQLite is widely spread across the industry and is considered to be one of the best embedded database manager available. For more information about SQLite: http://www.sqlite.org.
To create a new empty database, create a new file with CreateFile(). Database commands can now be used to create tables and add records.
A SQLite database has to be opened using OpenDatabase() before using any other database functions.
Example
UseSQLiteDatabase() Filename$ = OpenFileRequester("Choose a file name", "PureBasic.sqlite", "*.sqlite|*.sqlite", 0) If CreateFile(0, Filename$) Debug "Database file created" CloseFile(0) EndIf If OpenDatabase(0, Filename$, "", "") Debug "Connected to PureBasic.sqlite" If DatabaseUpdate(0, "CREATE TABLE info (test VARCHAR(255));") Debug "Table created" EndIf EndIf
See Also
OpenDatabase(), UsePostgreSQLDatabase(), UseODBCDatabase()
Supported OS
All