UseSQLiteDatabase()
语法
UseSQLiteDatabase()概要
Initialize the SQLite database environment for future use.
参数
无.
返回值
无.
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.
示例
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
参阅
OpenDatabase(), UsePostgreSQLDatabase(), UseODBCDatabase()
已支持操作系统
所有