|
|||||
|
|||
Functions | Platforms | ||
Interfaces, Database access (OMDB) |
OMDB is the OmniMark database interface library, a set of functions that let you access and manipulate information in relational databases. This library uses either your existing ODBC-compliant database software drivers or Oracle 8 (or higher) client installation, and requires OmniMark 6.1.2 or later.
OMDB is designed to be database vendor and database interface independent. In a few places, OMDB's behavior is dependent on the database vendor or interface, and notes have been added to the documentation specifying the differences.
The library consists of the following files:
Using the OMDB library is an introduction to the functions in the library, with sample code illustrating their use.
OMDB functions allow you to:
db.open-odbc
,
db.open-oci8
,
db.open-oci8i
,
db.close
)
db.set-transaction-type
,
db.commit
,
db.rollback
)
db.open-table
,
db.close
)
db.delete
,
db.insert
,
db.update
)
db.open-procedure
,
db.execute
,
db.close
)
db.execute-in
,
db.query
,
db.compile-statement
,
db.execute
,
db.streaming-execute
,
db.prepare
,
db.writer
,
db.discard
)
db.record-exists
,
db.move-record
,
db.advance-recordset
,
db.reader
)
The functions in this library use the following OMX components:
db.database
-- used by functions performing actions on the database as a whole.
db.field
-- used to retrieve a data value from a query.
db.table
-- used to modify the contents of a single table in the relational database.
db.statement
-- used to compile an SQL statement.
db.procedure
-- used to access a stored procedure in a database.
All dates, times, and timestamps are retrieved in the Date and Time library format. (This format returns the time with a time zone offset from UTC time.)
To use the OMDB functions in your OmniMark program, you have to add the following statement to your program:
import "omdb.xmd" prefixed by db.
If you are running OmniMark under UNIX and using ODBC to access databases, you must explicitly specify the location of your ODBC driver before you can use the OMDB library functions. Presuming your ODBC driver is installed in /usr/local/odbc:
LD_LIBRARY_PATH=/usr/local/odbc/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH=/usr/local/odbc/lib:$LD_LIBRARY_PATH
To make use of the OCI interface for accessing a database, you must have SQL*NET installed on your machine and configured to locate the database server(s) you wish to access. You need to have at least the Oracle 8 client installed. Additional functionality is supported if you have the Oracle 8i (or higher) client installed and are accessing an Oracle 8i (or higher) database.
None.
This is a complete list of the OMDB library external exceptions that may be thrown back to the calling OmniMark program.
OMDB001 Failed to allocate memory OMDB002 The database does not support the requested operation OMDB101 db.database is not currently open for statement execution OMDB103 The source db.database has left the current scope and is no longer available OMDB104 The source db.database has changed internal state OMDB105 The specified SQL statement has a zero length OMDB106 The specified transaction mode value is invalid OMDB107 The database does not support streaming LOB parameters. OMDB202 SQL query must return at least one column OMDB204 This database driver may only retrieve BLOB columns after all other columns. Reorder the columns in your query. OMDB205 The record set is not positioned on a valid row OMDB206 The database does not support the requested cursor movement OMDB207 The attempted field retrieval order requires an implicit refresh of the record set that is not supported by this database OMDB208 Absolute and relative cursor positions cannot both be specified OMDB209 The database has been closed since the query was executed OMDB210 An invalid value was specified for the cursor type OMDB302 db.field is not currently associated with a query OMDB303 The SQL operation associated with the db.field returns a single record that does not support cursor movement OMDB304 The db.field argument shelf contains no columns OMDB305 The db.field is not a streaming execution handle OMDB306 The db.field is a streaming execution handle OMDB307 An external output has already been created for the current parameter OMDB402 The requested stored procedure could not be found OMDB403 Unable to determine the parameter type in the procedure OMDB404 The number of parameters in the procedure exceeds OMDB's internal limit OMDB405 The db.procedure item is not currently open for processing requests OMDB406 The input value exceeds the maximum length allowed by the procedure parameter OMDB407 The procedure has more input parameters than items on the input shelf OMDB408 The specified procedure name has a zero length OMDB409 All of the procedure parameter description arguments must be supplied OMDB410 All of the procedure parameter description shelves must contain the same number of items OMDB411 The item keys of the procedure parameter description shelves are inconsistent with each other OMDB412 The procedure parameter data size must not be less than zero OMDB413 The procedure has been re-executed, so previous data is no longer available OMDB501 A database error occurred OMDB601 db.table is not currently open for processing OMDB603 The stream item key has no matching table column name OMDB604 The date/time stream shelf item must be in OmniMark date format OMDB605 The specified table name has a zero length OMDB606 The specified table record contains zero items OMDB607 The table record item has no key value OMDB701 db.statement is not currently open for processing OMDB702 The compiled statement requires input values OMDB703 The shelf of input parameter values for the compiled statement has too few items OMDB704 The compiled statement is a query and requires a db.field shelf argument to receive the results OMDB705 The input stream length exceeds the maximum size allowed by the parameter OMDB706 The ODBC driver is unable to determine the data types of the parameters in the SQL statement. The shelf of parameter data types is required by db.compile-statement using this ODBC driver. OMDB707 The shelf of input parameter data types values for the compiled statement has too few items OMDB708 An invalid value was specified for a parameter data type OMDB709 The number of parameters exceeds the database's limit OMDB710 A streaming execute operation is currently active on this statement OMDB711 This statement does not have an active streaming execute operation OMDB712 The data for this parameter has already been received OMDB999 An internal error was detected. Contact OmniMark Technologies.
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 |
Platforms HP/UX IBM AIX Linux (Intel) MS Windows 98/ME MS Windows NT/2000/XP Sun Solaris |