closes the Driver Module - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : Driver : Database/Driver/Close

Driver:-Close - closes the Driver Module

Calling Sequence

driver:-Close()

Parameters

driver

-

Driver module

Description

• 

Close frees the resources associated with driver.  This also happens when the resources are freed via garbage collection; however, you can call Close to release the resources immediately.

• 

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

Examples

Load the JDBC driver and open a connection to the database.

driver:=Database[LoadDriver]'driver'=com.database.Driver,'classpath'=/path/to/jar/jdbc.jar:

conn:=driver:-OpenConnectionjdbc:dbdriver://localhost/DBName,user1,passwd,'isolation'='serializable':

Close the driver.

driver:-Close

Try to use the connection.

conn:-ExecuteQuerySELECT * FROM datatable

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

Try to use the driver.

conn:=driver:-OpenConnectionjdbc:dbdriver://localhost/DBName,user1,passwd,'isolation'='serializable'

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

See Also

Database, Database[Connection], Database[Connection][SetOptions], Database[Driver], Database[JDBC], Database[usage]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam