Close - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Statement

  

Close

  

close a Statement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

statement:-Close( )

Parameters

statement

-

Statement module

Description

• 

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

• 

Any descendant modules of statement are closed when statement 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 statement, stat.

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:statconn:-CreateStatement:

Create a descendant of stat.

resstat:-ExecuteSELECT * FROM animals:

Close stat.

stat:-Close

Try using stat.

resstat:-ExecuteSELECT * FROM animals:

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

Try to use stat's descendant.

res:-Next

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

See Also

Database

Database[Result]

Database[Statement]

Database[Statement][Execute]

Database[usage]