@UNQOPEN

<< Click to Display Table of Contents >>

Navigation:  TCC > Variables & Functions > Functions >

@UNQOPEN

@UNQOPEN[mode,filename] : Open an UnQLite database. Use the same database name for the other @UNQ... functions.

 

The possible values for mode are:

 

RWCOpen a database with read+write privileges.  The database is created if it doesn't exist.

 

RWOpen the database with read+write privileges. If the database does not exist, an error is returned.

 

ROOpen the database in read-only mode. If the database does not exist, an error is returned.

 

MMA read-only memory-mapped view of the database.

 

If filename is ":mem:", then a private in-memory database is created. The in-memory database will be discarded when the database is closed.

 

If the specified database is already opened, @UNQOPEN will not open a new instance. So you cannot have the same database open with different read/write modes.

 

@UNQOPEN returns 0 if the database was successfully opened (or is already open), or non-zero on an error.