Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

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

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software