<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > SQLite > SQLite_Open |
Description
Open a SQLite database
Syntax
n = SQLite_Open(sFileName [, sModificators])
Returns
Number.
Returns zero if processed OK.
Parameters
Name |
Type |
Optional |
Meaning |
sFileName |
String |
No |
sFileName is the SQLite file to open as a database. There are three special file names: 1.":memory:" = opens an empty tempory database in memory. 2."" (empty or omitted) = opens an empty temporary database on disk. 3.A valid file name |
sModificators |
String |
Yes |
ModChars is a string with flags. Below possible options: C = Create if not there. Ignored if ReadOnly. Em = Return errors. This will override the global return errors flag. m is the optional message display modifier and can be: 0 = No message is displayed. This is the default. 1 = Display a warning message with OK button. Error is returned when OK pressed. 2 = Display a question message with OK and Cancel buttons. If they press OK, error is returned. If they press Cancel, will exit process. e = Do not return errors, display message and exit process. This will override the global return errors flag. f = Do not enable foreign key support. If 'f' is passed then will send: PRAGMA foreign_keys=Off If 'f' is not passed then will send: PRAGMA foreign_keys=On R = Will pass the ReadOnly attribute to SQLite. You will not be able to update the database. Never use with inherited handles. Tn = Where n is milliseconds to wait for a database lock. Default is 10000 milliseconds (10 seconds). |
Remarks
Restrictions
See also
Examples