返回所有从连接开始到现在发生改变的数量(包括通过触发器和外部键)
#include <SQLite.au3>
_SQLite_TotalChanges ( [ $hDB ] )
$hDB | [可选参数] 打开的数据库,默认为最后打开的数据库 |
成功: | 返回更改数量 |
失败: | 返回 0. |
@error: | 1 - 错误调用 SQLite API 'sqlite3_total_changes' |
2 - 调用被安全模式阻止 |
#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);") ; 创建表
_SQLite_Exec(-1, "INSERT INTO test VALUES ('1', '2');") ; 插入第一行
_SQLite_Exec(-1, "INSERT INTO test VALUES ('3', '4');") ; 插入第二行
MsgBox(4096, "SQLite", "The last SQL statement changed " & _SQLite_Changes() & " rows" & @CRLF & _
"All statements during this session changed " & _SQLite_TotalChanges() & " rows")
_SQLite_Close()
_SQLite_Shutdown()