ClearBindings - 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]

  

ClearBindings

  

reset bindings in a prepared SQL statement

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ClearBindings( statement )

Parameters

statement

-

prepared SQL statement obtained using the Prepare command

Description

• 

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

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:

Execute statement again without clearing - the "value 1" is inserted

Resetstmt

Stepstmt:

Resetstmt

Clear bound value and bind a new one

ClearBindingsstmt

Bindstmt,1,value 2

Stepstmt:

Finalizestmt:

stmtPrepareconnection,SELECT * FROM test

stmtSQLite statement,SELECT * FROM test

(2)

FetchAllstmt

value 1value 1value 2

(3)

Finalizestmt:

Closeconnection:

Compatibility

• 

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

• 

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

See Also

Database[SQLite][Bind]

Database[SQLite][Reset]