swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts   Other Library Functions  
function  

db.close

 
 

Library: Interfaces, Database access (OMDB)
Import: omdb.xmd

Declaration

  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

database
is a db.database object obtained by opening a connection to a database using one of the db.open functions.
procedure
is the db.procedure object associated with a stored procedure.
table
is a db.table object attached to a database table.


Purpose

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.

Usage Notes

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.

Example:

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

    Related Syntax
   db.open-odbc
   db.database
   db.open-oci8
   db.open-oci8i
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   db.advance-recordset
   db.close
   db.commit
   db.compile-statement
   db.database
   db.delete
   db.discard
   db.execute
   db.execute-in
   db.field
   db.insert
   db.move-record
   db.omdb-version
   db.omdb-version-oci8
   db.omdb-version-oci8i
   db.omdb-version-odbc
   db.open-oci8
   db.open-oci8i
   db.open-odbc
   db.open-procedure
   db.open-table
   db.prepare
   db.procedure
   db.query
   db.reader
   db.record-exists
   db.rollback
   db.set-transaction-type
   db.statement
   db.streaming-execute
   db.table
   db.update
   db.writer
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:02 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.