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

 Reset
 reset a prepared SQL statement

 Calling Sequence Reset( statement, opts )

Parameters

 statement - prepared SQL statement obtained using the Prepare command opts - (optional) equation(s) of the form option = value; specify options for the Reset command

Options

 • clear = truefalse
 True means clear all bound values by calling ClearBindings after the statement is reset. The default is false.

Description

 • The Reset command resets a prepared SQL statement so that it can be executed again.

Examples

 > $\mathrm{with}\left({\mathrm{Database}}_{\mathrm{SQLite}}\right):$
 > $\mathrm{db}≔{\mathrm{FileTools}}_{\mathrm{JoinPath}}\left(\left[\mathrm{kernelopts}\left('\mathrm{datadir}'\right),"SQLite","G20-Population.db"\right]\right):$
 > $\mathrm{connection}≔\mathrm{Open}\left(\mathrm{db}\right):$

Select data from table - prepare statement

 > $\mathrm{stmt}≔\mathrm{Prepare}\left(\mathrm{connection},"SELECT * FROM population"\right)$
 ${\mathrm{stmt}}{≔}{"SQLite statement"}{,}{"SELECT * FROM population"}$ (1)

Fetch all rows

 > $\mathrm{FetchAll}\left(\mathrm{stmt}\right)$

Reset the statement and select data again

 > $\mathrm{Reset}\left(\mathrm{stmt}\right):$
 > $\mathrm{FetchAll}\left(\mathrm{stmt}\right)$
 > $\mathrm{Finalize}\left(\mathrm{stmt}\right):$
 > $\mathrm{Close}\left(\mathrm{connection}\right):$

Compatibility

 • The Database[SQLite][Reset] command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.

 See Also