function
|
Library: Database access (OMDB)
Import : omdb.xmd |
define external function db.close
value db.database database
or
define external function db.close
value db.procedure procedure
or
define external function db.close
value db.table table
Argument definitions
Use db.close to explicitly close an existing connection to a database (db.database), a database table (db.table), or a stored procedure (db.procedure). This has the effect of releasing any resources the object was using.
A connection to a database will automatically close when the db.database OMX variable you created goes out of scope. However, a global db.database OMX variable will not go out of scope until the end of the program.
Closing an unopened db.database object is allowed.
Closing a previously closed db.database object is allowed.
Closing a procedure more than once is allowed.
You are allowed to close a previously closed table.
Open a connection to a database and then close the connection.
import "omdb.xmd" prefixed by db. global db.database my-database process set my-database to db.open-odbc "DatabaseDemo" . . . db.close my-database