world.DatabaseTotalChanges
Returns a count of the total changes to the database
Prototype
long DatabaseTotalChanges(BSTR DbName);
Description
This function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the database connection was opened. The count includes all changes from all trigger contexts. However, the count does not include changes used to implement REPLACE constraints, do rollbacks or ABORT processing, or DROP table processing. The changes are counted as soon as the statement that makes them is completed (when the statement handle is passed to DatabaseReset or DatabaseFinalize).
Lua example
changes = DatabaseTotalChanges ("db")
Return value
A positive integer, or zero, indicating the count of changes.
Otherwise:
-1 : Database id not found
-2 : Database not open
Related topic
See also
| Function | Description |
|---|---|
| DatabaseChanges | Returns a count of the changes to the database by the most recent SQL statement |
| DatabaseExec | Executes SQL code against an SQLite database |
| DatabaseLastInsertRowid | Returns the most recently automatically allocated database key |
| DatabaseStep | Executes a previously-prepared SQL statement |