Close - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

PreparedStatement

  

Close

  

close a PreparedStatement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

preparedstat:-Close( )

Parameters

preparedstat

-

PreparedStatement module

Description

• 

Close frees the resources associated with preparedstat. This happens automatically when preparedstat is garbage collected; however, you can call Close to release the resources immediately.

• 

Any descendant modules of preparedstat are closed when preparedstat is closed. (A module is a descendant of a parent module if it is returned by one of the parent module's exports or if it is a descendant of one of the parent module's descendants.)

Examples

Create a prepared statement, pstat.

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:pstatconn:-CreatePreparedStatementSELECT * FROM animals:

Create a descendant of pstat.

respstat:-Execute:

Close pstat.

stat:-Close

Try using pstat.

respstat:-ExecuteSELECT * FROM animals:

 Error, (in ExecuteQuery) this object has been closed, no further operations are possible

Try to use pstat's descendant.

res:-Next

 Error, (in ExecuteQuery) this object has been closed, no further operations are possible

See Also

Database

Database[PreparedStatement]

Database[PreparedStatement][Execute]

Database[Result]

Database[Statement]

Database[usage]

 


Download Help Document