data type
Library: Database access (OMDB legacy)
Include: omdb.xin |
The dbDatabase
datatype 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.
To use instances of type dbDatabase
in your program, you must include the following in your
program:
include "omdb.xin"
Within your program, you can create as many instances of type dbDatabase
as you require by declaring
global
and local
shelves of type dbDatabase
.
Creating and discarding instances of type dbDatabase
is accomplished using the following functions:
dbOpenODBC
-- make a connection to an ODBC compliant database.
dbOpenOCI9i
-- make a connection to an Oracle database using an Oracle 9i client
installation. Connectivity using OCI9i is supported on SunOS 5.8 only.
dbOpenOCI10g
-- make a connection to an Oracle database using an Oracle 10g client
installation.
dbOpenOCI11g
-- make a connection to an Oracle database using an Oracle 11g client
installation.
dbClose
-- close an existing database connection.
dbDatabase
are used as parameters by the following OMDB library functions:
dbSetTransactionType
-- set the mode of a database connection to either auto-commit or
manual-commit.
dbCommit
-- commit all the insert, delete, or update operations performed since the last
dbCommit or dbRollback.
dbExecute
-- execute a single SQL statement on the specified database.
dbProcedureOpen
-- open a connection to a procedure store in the specified database.
dbQuery
-- execute a single SQL query on the specified database.
dbRollback
-- roll back (cancel) all operations not yet committed to the database.
dbStatementCompile
-- compile an SQL statement.
dbTableOpen
-- open a connection to a table in a connected database.
Once you have declared a shelf of type dbDatabase
, you can use it with one of the open functions
(such as dbOpenODBC
) in the legacy OmniMark Database library to create connections to databases.
include "omdb.xin" process local dbDatabase d set d to dbOpenODBC "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 legacy OmniMark Database library.