函数参考


_SQLite_Close

关闭一个打开的 SQLite 数据库.

#include <SQLite.au3>
_SQLite_Close ( [ $hDB ] )

参数

$hDB [可选参数] 数据库句柄.

返回值

成功: 返回 $SQLITE_OK.
失败: 随机返回值,您可以和 $SQLITE_* 常量中的值进行对照.
@error: -1 - SQLite 报告错误 (检查返回值)
1 - 错误调用 SQLite API 'sqlite3_close'
2 - 调用被安全模式阻止

注意/说明

It waits for SQLite <> $SQLITE_BUSY until 'global Timeout' has elapsed.
如果没有数据库句柄, 最后打开的数据库将被关闭.
Prior to calling _SQLite_Close, the application must invoke _SQLite_QueryFinalize for each query explicitely left unfinalized.

相关

_SQLite_Open

示例/演示


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

_SQLite_Startup()
If @error Then
    MsgBox(16, "SQLite Error", "SQLite.dll Can't be Loaded!")
    Exit -1
EndIf
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Open() ; Open a :memory: database
If @error Then
    MsgBox(16, "SQLite Error", "Can't Load Database!")
    Exit -1
EndIf
_SQLite_Close()
_SQLite_Shutdown()