Database[SQLite] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : SQLite : Database/SQLite/Prepare

Database[SQLite]

  

Prepare

  

prepare SQL statement

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Prepare( connection, sql )

Parameters

connection

-

database connection obtained using Open command

sql

-

SQL statement

Description

• 

The Prepare command prepares SQL statement for execution.

Examples

withDatabase[SQLite]

Attach,Bind,ClearBindings,Close,ColumnCount,ColumnNames,Execute,Fetch,FetchAll,FetchRow,Finalize,Open,Opened,Prepare,RESULT_BUSY,RESULT_DONE,RESULT_ROW,Reset,Step

(1)

dbFileTools[JoinPath]kernelopts'datadir',SQLite,G20-Population.db:

connectionOpendb:

Select data from table - prepare statement

stmtPrepareconnection,SELECT * FROM population

stmtSQLite statement,SELECT * FROM population

(2)

Fetch all rows

FetchAllstmt

53 x 21 MatrixData Type: anythingStorage: rectangularOrder: C_order

(3)

Finalizestmt:

Closeconnection:

Compatibility

• 

The Database[SQLite][Prepare] 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][FetchAll]

Database[SQLite][Finalize]

Database[SQLite][Step]