|
|||||
|
|||
Functions | Platforms | ||
Database access (OMDB) legacy library |
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:
dbOpenODBC
,
dbOpenOCI8
,
dbOpenOCI8i
,
dbClose
)
dbSetTransactionType
,
dbCommit
,
dbRollback
)
dbTableOpen
,
dbTableClose
)
dbTableDelete
,
dbTableInsert
,
dbTableUpdate
)
dbProcedureOpen
,
dbProcedureExecute
,
dbProcedureClose
)
dbExecute
,
dbQuery
,
dbStatementCompile
,
dbStatementExecute
,
dbStatementStreamingExecute
,
dbFieldPrepare
,
dbFieldSink
,
dbStatementDiscard
)
dbRecordExists
,
dbRecordMove
,
dbRecordSetMove
,
dbFieldValue
)
The functions in this library use the following OMX components:
dbDatabase
-- used by functions performing actions on the database as a whole.
dbField
-- used to retrieve a data value from a query.
dbTable
-- used to modify the contents of a single table in the relational database.
dbStatement
-- used to compile an SQL statement.
dbProcedure
-- 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:
include "omdb.xin"
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 dbDatabase is not currently open for statement execution OMDB103 The source dbDatabase has left the current scope and is no longer available OMDB104 The source dbDatabase 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 dbField is not currently associated with a query OMDB303 The SQL operation associated with the dbField returns a single record that does not support cursor movement OMDB304 The dbField argument shelf contains no columns OMDB305 The dbField is not a streaming execution handle OMDB306 The dbField 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 dbProcedure 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 dbTable 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 dbStatement 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 dbField 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 dbStatementCompile 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 dbClose dbCommit dbDatabase dbExecute dbField dbFieldPrepare dbFieldSink dbFieldValue dbIsVersionCompatible dbLibraryVersion dbLibraryVersionOCI8 dbLibraryVersionOCI8i dbLibraryVersionODBC dbOpenOCI8 dbOpenOCI8i dbOpenODBC dbProcedure dbProcedureClose dbProcedureExecute dbProcedureOpen dbQuery dbRecordExists dbRecordMove dbRecordSetMove dbRollback dbSetTransactionType dbStatement dbStatementCompile dbStatementDiscard dbStatementExecute dbStatementStreamingExecute dbTable dbTableClose dbTableDelete dbTableInsert dbTableOpen dbTableUpdate |
Platforms HP/UX IBM AIX Linux (Intel) MS Windows 98/ME MS Windows NT/2000/XP Sun Solaris |