Database[SQLite]
Prepare
prepare an SQL statement
Calling Sequence
Parameters
Description
Examples
Compatibility
Prepare( connection, sql )
connection
-
database connection obtained using the Open command
sql
string; SQL statement
The Prepare command prepares an SQL statement for execution.
with⁡DatabaseSQLite:
db ≔ FileToolsJoinPath⁡kernelopts⁡'datadir',SQLite,G20-Population.db:
connection ≔ Open⁡db:
Select data from table - prepare statement
stmt ≔ Prepare⁡connection,SELECT * FROM population
stmt≔SQLite statement,SELECT * FROM population
Fetch all rows
FetchAll⁡stmt
Finalize⁡stmt:
Close⁡connection:
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]
Download Help Document