sqlite_openT_sqlite_openSqliteOpenSqliteOpen (Operator)

Name

sqlite_openT_sqlite_openSqliteOpenSqliteOpen — Opens an SQLite3 data base.

Signature

sqlite_open( : : FileName : SqliteHandle)

Herror T_sqlite_open(const Htuple FileName, Htuple* SqliteHandle)

void SqliteOpen(const HTuple& FileName, HTuple* SqliteHandle)

static void HHdevguiServerExtpack.SqliteOpen(HTuple fileName, out HTuple sqliteHandle)

Description

sqlite_opensqlite_openSqliteOpenSqliteOpenSqliteOpen opens an SQLite3 data base.

If the filename is ":memory:", then a private, temporary in-memory database is created for the connection. This in-memory database will vanish when the database connection is closed. Future versions of SQLite might make use of additional special filenames that begin with the ":" character. It is recommended that when a database filename actually does begin with a ":" character you should prefix the filename with a pathname such as "./" to avoid ambiguity.

If the filename is an empty string, then a private, temporary on-disk database will be created. This private database will be automatically deleted as soon as the database connection is closed.

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

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

FileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleHtuple (string) (string) (HString) (char*)

full path of the database file

Default value: ':memory:' ":memory:" ":memory:" ":memory:" ":memory:"

Suggested values: ':memory:'":memory:"":memory:"":memory:"":memory:", ''"""""""", 'C:/TEMP/mydata.db'"C:/TEMP/mydata.db""C:/TEMP/mydata.db""C:/TEMP/mydata.db""C:/TEMP/mydata.db"

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

handle to a SQLite data base

Example (HDevelop)

sqlite_open (':memory:', SqliteHandle)
sqlite_exec (SqliteHandle, 'CREATE TABLE mytable(name TEXT, age INTEGER);', [])
sqlite_tables (SqliteHandle, Tables) // Tables = 'mytable'

Module

Foundation