Opens or creates a SQLite3 database.
b = object.Open( dbfile [, Mode = 0])
dbfile - Database file to open or create if it does not
Mode - currently ignored.
Return value: Boolean success indicator (True - success,
False - Failure). If failed check LastError
for the error text.
Set db = Server.CreateObject("newObjects.sqlite.dbutf8")
If db.Open(Server.MapPath("/db/mydb.db")) Then
' Continue with the actual work
' Deal with the error further
Response.Write "Error occured: " & db.LastError
The database file can be opened in shared mode - i.e. different
pages or even different applications can use separate SQLite COM
objects to open and use the same database. However, it is
recommended to use the programming environment capabilities and use
single SQLite COM object if it is possible. Especially for Windows
CE devices this could be crucial because of the platform limitations
in the file locking area of functionality. For instance in ASP/ALP
applications the Application can be used to hold the opened object.
If the write operations are not too frequent opening and closing the
DB in each page is good enough (it is quite fast) but you may need
to configure the BusyTimeout in
order to avoid failures when collisions occur.
Applies to: SQLite3 COM
See also: Close, BusyTimeout,
Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later