sqlite_execT_sqlite_execSqliteExecSqliteExec (Operator)

Name

sqlite_execT_sqlite_execSqliteExecSqliteExec — Runs a single or multiple SQL statements.

Signature

sqlite_exec( : : SqliteHandle, Sql, BindParams : )

Herror T_sqlite_exec(const Htuple SqliteHandle, const Htuple Sql, const Htuple BindParams)

void SqliteExec(const HTuple& SqliteHandle, const HTuple& Sql, const HTuple& BindParams)

static void HHdevguiServerExtpack.SqliteExec(HTuple sqliteHandle, HTuple sql, HTuple bindParams)

Description

sqlite_execsqlite_execSqliteExecSqliteExecSqliteExec runs a single or multiple SQL statements. Multiple SQL statements are separated by semicolons.

The statements will be executed immediatelly. The outputs can be acquired by-row with the help of operator sqlite_stepsqlite_stepSqliteStepSqliteStepSqliteStep.

In case of errors, the current statement stops and subsequent statements will be skipped. In this case, the operator returns with error code 1302 (H_ERR_WIPV2 / Wrong value of control parameter: 2). An additional and error message with more details will be output in the HDevelop Output Console, see set_systemset_systemSetSystemSetSystemSetSystem parameter 'do_low_error'"do_low_error""do_low_error""do_low_error""do_low_error".

Find more information about the Sqlite extension package in the introduction to this chapter.

Execution Information

Parameters

SqliteHandleSqliteHandleSqliteHandleSqliteHandlesqliteHandle (input_control)  framegrabber HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

handle to a SQLite data base

SqlSqlSqlSqlsql (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

SQL statement(s)

BindParamsBindParamsBindParamsBindParamsbindParams (input_control)  string(-array) HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

questionmarks in SQL statement are bound to the elements of this tuple

Example (HDevelop)

  Sql := 'INSERT INTO results(timestamp,filename,text) VALUES(strftime(\'%s\', \'now\'), ?1, ?2);'
  sqlite_exec (SqliteHandle, Sql, [MyFilename, MyText])

Possible Successors

sqlite_stepsqlite_stepSqliteStepSqliteStepSqliteStep

Module

Foundation