_sqliteOpenFileEx
Open a new connection to a db file.
Prototype :
fun [Chn P I I I] ObjSqlite
- Chn : a channel, typically the current channel.
- P : a read-reference file (db file).
- I : flag : SQLITE_READWRITE (default) or SQLITE_ONLYREAD. nil for default value.
- I : flag : SQLITE_OPEN_PRIVATE_CACHE (default) or SQLITE_OPEN_SHAREDCACHE (see _sqliteSharedCacheEnabled too). nil for default value.
- I : flag : SQLITE_OPEN_FULLMUTEX (default) or SQLITE_OPEN_NOMUTEX (multi-thread); see _sqliteThreadsafe too. nil for default value.
Return : ObjSqlite a new Scol object or nil if error.
See also :
_sqliteOpenFile
_sqliteOpenMemory
_sqliteOpenTemp
_sqliteClose
_sqliteSharedCacheEnabled
_sqliteThreadsafe
Example :
typeof mydb = ObjSqlite;;
fun main ()=
_showconsole;
set mydb = _sqliteOpenFile _channel "mybase.db" SCOL_SQLITE_ONLYREAD nil nil;
if mydb == nil then
// error : do something
else
// success : do something
0;;
Note
VFS configuration functions are not included. The default configuration
of the host system is used.
About cache, see http://www.sqlite.org/sharedcache.html too.