Function Reference


_SQLite_TotalChanges

Returns number of all changes (including via triggers and foreign keys) from start of connection

#include <SQLite.au3>
_SQLite_TotalChanges ( [$hDB = -1] )

Parameters

$hDB [optional] An open database, default is the last opened database

Return Value

Success: the number of changes.
Failure: 0.
@error: 1 - Error calling SQLite API 'sqlite3_total_changes'
2 - Call prevented by SafeMode

Related

_SQLite_Changes

Example

#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>

_SQLite_Startup()
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Open()
_SQLite_Exec(-1, "CREATE TABLE test (a, b);") ; Create Table
_SQLite_Exec(-1, "INSERT INTO test VALUES ('1', '2');") ; Insert Row 1
_SQLite_Exec(-1, "INSERT INTO test VALUES ('3', '4');") ; Insert Row 2
MsgBox($MB_SYSTEMMODAL, "SQLite", "The last SQL statement changed " & _SQLite_Changes() & " rows" & @CRLF & _
                "All statements during this session changed " & _SQLite_TotalChanges() & " rows")
_SQLite_Close()
_SQLite_Shutdown()