|
|||||
db.database
|
The db.database OMX component 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.
Within your program, you can create as many instances of the db.database OMX component as you require by declaring global and local variables of type "db.database".
Please refer to OMX Components for a general description of OMX components and how they are used.
The functions
db.open-odbc
- make a connection to an ODBC compliant database.
db.open-oci8
- make a connection to an Oracle 8 (or higher) database using an Oracle 8 (or higher) client installation
db.open-oci8i
- make a connection to an Oracle 8i (or higher) database using an Oracle 8i (or higher) client installation
db.set-transaction-type
- set the mode of a database connection to either auto-commit or manual-commit.
db.close
- close an existing database connection.
db.commit
- commit all the insert, delete, or update operations performed since the last db.commit or dbRollback.
db.execute-in
- execute a single SQL statement on the specified database.
db.open-procedure
- open a connection to a procedure store in the specified database.
db.query
- execute a single SQL query on the specified database.
db.rollback
- roll back (cancel) all operations not yet committed to the database.
db.compile-statement
- compile an SQL statement.
db.open-table
- open a connection to a table in a connected database.
Once you have declared your db.database OMX variables, you can use them with one of the dbOpen functions (such as db.open-odbc
) in the OmniMark Database library to create connections to databases.
import "omdb.xmd" prefixed by db. process local db.database my-database set my-database 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 OmniMark Database library.