Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

Development

OmniAccess API

Status Array

 

OmniAccess API

Programming Basics

Managing Data

Functions

 

Development

Overview

The Omnidex Access Application Programming Interface (OmniAccess API), is the basis for all Omnidex application programming.

All Omnidex applications, including ODBC and JDBC applications, ultimately pass through the OmniAccess API.

Omnidex applications that use the OmniAccess API can take advantage of all the features available with Omnidex, including the ability to use standard SQL for queries against any database.

There are two flavors of the OmniAccess API: Server API, also known as OA, and Client API, also known as CLOA. All of the functions for both OA and CLOA are the same except that CLOA functions are prepended with CL in the function name.

An OA application will connect directly to an Omnidex Environment Catalog, where as a CLOA application will connect to an Omnidex Data Source, which connects to an Omnidex Environment Catalog through an Omnidex Network Server.

Both OA and CLOA applications can be written using a variety of languages including C, C++, Visual Basic and Cold Fusion.

 

Status Array

Whenever any OmniAccess routine is executed, information about the execution of that routine is returned to the status array. This information includes error numbers, qualifying counts, instance and cursor numbers as well as other pieces of information used internally by OmniAccess.

The status array structure is declared in the oa.h file and contains 10 named integers, 32 generic integers, and 6 types of character buffers.

The first ten elements return the same information for all OmniAccess routines, although they may not apply to all routines. For example, element 4 contains a qualifying count for routines like oaqualify and oajoin. But a qualifying count is meaningless for routines like oaconnect and oaopencursor.

oastatus_t is a type declaration for the OmniAccess status array, which is used in nearly all OmniAccess routines.

typedef struct oastatus
{

int

error;

int

warn;

int

info;

int

count;

int

bufflen;

int

instance;

int

cursor;

int

transaction;

int

cpu;

int

elapsed;

int

data[32];

char

buffer[256];

char

native_error[256];

char

location[256];

char

context[256];

char

msgs[8][256];

char

reserved[1024];

} oastatus_t;

warn - This element contains the error condition for the executed OmniAccess routine. This is a 32-bit signed integer representing an error code contained in the global environment file or OAGLOBAL.
If this element contains something other than 0 (Successful completion), then something has happened that is severe enough that requires the application to address the condition. For example, a syntax error, invalid or inaccessible tables, or end of data.
In this case, the application should call oaerror to obtain the error message and any additional available information.

info - This element contains the warning condition for the executed OmniAccess routine. This is a 32-bit signed integer representing a warning code contained in the oaglobal environment file.
If this element contains something other than 0 (Successful completion), then something has happened that the application may wish to know about, though it is not severe enough that the application is required to address the condition. For example, fewer rows were returned than were requested.
A call to oaerror with the WARN option, will return the message corresponding to the warning code.

 

The following status array structure is supported for backward compatibility.

typedef struct oastatus_30600
{

int

error;

int

warn;

int

info;

int

count;

int

bufflen;

int

instance;

int

cursor;

int

transaction;

int

data[6];

char

buffer[36];

} oastatus_30600_t;

 

 

 

Top