Bind - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Database[SQLite]

  

Bind

  

bind value to a parameter in a prepared SQL statement

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Bind( statement, parameter, value, opts )

Parameters

statement

-

prepared SQL statement obtained using the Prepare command

parameter

-

posint; index of the SQL parameter

value

-

value to be assigned

opts

-

(optional) equation(s) of the form option = value; specify options for the Bind command

Options

• 

valuetype = string

  

The valuetype option specifies the type of the value. It may be one of the strings "auto", "blob", "float", "integer", or "text". See the Database[SQLite] help page for more information about type conversion between SQLite and Maple. The default is "auto".

Description

• 

The Bind command resets value bindings for parameters in a prepared SQL statement.

• 

parameter is the index of the SQL parameter to be set. The leftmost SQL parameter has an index of 1.

Examples

withDatabaseSQLite:

connectionOpen:memory::

Executeconnection,CREATE TABLE test (val):

stmtPrepareconnection,INSERT INTO test VALUES (?)

stmtSQLite statement,INSERT INTO test VALUES (?)

(1)

Bindstmt,1,value 1

Stepstmt:

Finalizestmt:

stmtPrepareconnection,SELECT * FROM test

stmtSQLite statement,SELECT * FROM test

(2)

FetchAllstmt

value 1

(3)

Finalizestmt:

Closeconnection:

Compatibility

• 

The Database[SQLite][Bind] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Database[SQLite][ClearBindings]