swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   dbClose    

Library: omdb - high level database access
Include: omdb.xin

Declaration

  define external function dbClose
     value dbDatabase database

Where:
database



Purpose

The dbClose function closes an existing database connection that was created using the dbOpenODBC function, and releases the resources the database was using. Attempting to close a connection that is not open is allowed.

Under most circumstances, the dbClose function is unnecessary because the connection to the database will automatically close when the dbDatabase OMX variable you created goes out of scope.

If, however, you create a global dbDatabase OMX variable, that variable will not go out of scope until the end of the program. When your program has finished using the database, however, you can free the resources the database is using by explicitly closing the connection with the dbClose function rather than waiting for the dbDatabase OMX variable to go out of scope.

In this example, a connection to a database is opened and then immediately terminated:

        include "omdb.xin"

        global dbDatabase my-database

        process
           set my-database to dbOpenODBC "DatabaseDemo"

           dbClose my-database

        Other Library Functions
   dbClose
   dbExecute
   dbFieldValue
   dbIsVersionCompatible
   dbLibraryVersion
   dbOpenODBC
   dbQuery
   dbRecordExists
   dbRecordMove
   dbTableClose
   dbTableDelete
   dbTableInsert
   dbTableOpen
   dbTableUpdate
 
----  

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

Generated: August 11, 2000 at 3:07:05 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.