db.database

data type

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


Purpose

The db.database data type allows you to use either your existing ODBC-compliant software drivers or your Oracle client drivers to create a connection to and manipulate a database.

Usage Notes

Within your program, you can create as many instances of the db.database data type as you require by declaring global and local shelves of type db.database.

Related OMDB library functions

Creating and discarding instances of type db.database is accomplished using the following functions:

Instances of type db.database are used as parameters by the following OMDB library functions:

Example

Once you have declared a shelf of type db.database, you can use it with one of the database open functions (such as db.open-odbc) in the OMDB library to create connections to databases.

  import "omdb.xmd" prefixed by db.
  
  process
     local db.database d
  
     set d to db.open-odbc "MyDatabase"

Assuming that no errors occur when establishing the connection to the database, you can now manipulate the data in that database using the other functions in the OMDB library.