Function Reference


_SQLite_Changes

Returns the number of database rows that were changed by the most recently completed statement with this connection

#include <SQLite.au3>
_SQLite_Changes ( [$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_changes'
2 - Call prevented by SafeMode

Remarks

Changes due to action of triggers or foreign keys are not part of this count. See _SQLite_TotalChanges().

Related

_SQLite_TotalChanges

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()