SqlOpenDatabase: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 20: | Line 20: | ||
Rem SqlOpenDatabase sample | Rem SqlOpenDatabase sample | ||
DB = SqlOpenDatabase("customers.db","1.0","My Customer Database") | DB = SqlOpenDatabase("customers.db","1.0","My Customer Database") | ||
Print "Database version is " & DB.version</pre> | If DB.version <> "" Then | ||
Print "Database version is " & DB.version | |||
Else | |||
print "Database not found." | |||
End If | |||
</pre> | |||
== Output == | == Output == |
Revision as of 15:05, 25 October 2013
SqlOpenDatabase(filename[, version[, fullname[, maxSize']]]')
Description
SqlOpenDataBase is used to create and open SQLite databases.
filename is the actual name of the file. If filename does not exist, it is created.
version (optional) is the version number. Used on file creation. Set to "1.0" if no value supplied.
fullname (optional) is a long description of the file. (optional). Used on file creation. Set to filename if no value supplied.
maxsize (optional) is the maximum number of records (optional). Used on file creation. Set to 1,000,000 if no value supplied.
For more information on SQLite, see Using SQLite.
Example
Rem SqlOpenDatabase sample DB = SqlOpenDatabase("customers.db","1.0","My Customer Database") If DB.version <> "" Then Print "Database version is " & DB.version Else print "Database not found." End If
Output
Database version is 1.0