Returns last error code (numeric)
#include <SQLite.au3>
_SQLite_ErrCode ( [$hDB = -1] )
$hDB | [optional] An open database, default is the last opened database |
Success: | a value can be compared against $SQLITE_* constants. |
Failure: | 0. |
@error: | 1 - error calling SQLite API 'sqlite3_errcode' 2 - Call Prevented by SafeMode |
#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>
_SQLite_Startup()
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Open()
If $SQLITE_OK <> _SQLite_Exec(-1, "CREATE TABLE test (a', 'b');") Then _ ; a Quote is missing
MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Error Code: " & _SQLite_ErrCode() & @CRLF & "Error Message: " & _SQLite_ErrMsg())
_SQLite_Close()
_SQLite_Shutdown()