db_query_close

query ハンドルを閉じる

db_query_close qh

qh : query ハンドル

(プラグイン / モジュール : hspdb.dll)

解説

db_query で取得した query ハンドルを解放します。

情報

プラグイン / モジュールhspdb.dll
バージョン1.0
作成日2026-04-15
著作者IronHSP / iron_db
URLhttps://github.com/inovia/IronHSP
備考iron_db.hsp は hspdb.dll (SQLite 3.46 amalgamation 埋め込み) を
HSP から扱いやすくしたラッパモジュールです。組み込みデータベースを
1 行 API で利用できます。

#include "iron_db.hsp"

典型的な使い方:
h = db_open("test.db")
db_exec h, "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)"
db_exec h, "INSERT INTO users (name, age) VALUES ('Alice', 30)"
qh = db_query(h, "SELECT name, age FROM users WHERE age > 20")
repeat
db_step qh
if stat = 0 : break
db_col_text qh, 0, name
age = db_col_int(qh, 1)
mes name + " (" + age + ")"
loop
db_query_close qh
db_close h
タイプ拡張命令
グループiron_db ― クエリ
対応環境
  • その他 : Win32 / Win64
hs ファイルhsphelp\iron_db.hs