Arguments: |
There are no arguments for this method.
|
Return value: |
An ooSQLite Result Code Constants code. Returns OK if the connection is successfully closed and
all associated resources are deallocated. Returns BUSY if the connection is associated with unfinalized prepared
statements or unfinished backup objects.
|
Remarks: |
Programs should finalize all prepared statements, close all BLOB handles, and finish all backup objects associated with
the connection object prior to attempting to close the object. It is a harmless nop to invokecloseon a connection object that has already been closed. The attributes of the object are
still valid after the connection is closed, but invoking other methods of a closed connection object is an error.
|
Details: |
The functionality of theclosemethod is similar to that of the SQLite
sqlite3_close API.
|
Example: |
This example opens a database to do some work with it, then closes it. Note that if an error ocurrs trying to open the
database, the connection object is still closed:
dbFile = 'ooFoods.rdbx' |
|
db = .ooSQLiteConnection~new(dbFile, .ooSQLite~OPEN_READWRITE) |
if db~initCode >.<. 0 then do |
-- do error stuff |
... |
db~close |
return 99 |
end |
|
-- work with the database |
... |
|
db~close
|
|