Close an open database
#include <SQLite.au3>
_SQLite_Close ( [$hDB = -1] )
$hDB | [optional] Database handle. |
Success: | $SQLITE_OK. |
Failure: | a value can be compared against $SQLITE_* constants. |
@error: | -1 - SQLite reported an error (Check Return value) 1 - Error calling SQLite API 'sqlite3_close' 2 - Call prevented by SafeMode |
It waits for SQLite <> $SQLITE_BUSY until 'global Timeout' has elapsed.
If no database handle is given, the last opened database will be closed.
Prior to calling _SQLite_Close(), the application must invoke _SQLite_QueryFinalize() for each query explicitely left unfinalized.
#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>
_SQLite_Startup()
If @error Then
MsgBox($MB_SYSTEMMODAL, "SQLite Error", "SQLite.dll Can't be Loaded!")
Exit -1
EndIf
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Open() ; Open a :memory: database
If @error Then
MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Can't Load Database!")
Exit -1
EndIf
_SQLite_Close()
_SQLite_Shutdown()