Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

OmniAccess API

Functions

Syntax

Options

Example

 

OmniAccess API

Programming Basics

Managing Data

Functions

 

OAINSERTINDEX

oainsertindex, when used with a native routine to add rows to a table, updates the OMNIDEX indexes to include any key values corresponding to the row identified by rowid. Incorporating this routine into your native update applications lets you automatically maintain OMNIDEX indexes whenever a row is inserted.

 

Syntax

oainsertindex (instance, options, status, table, columns, buffer, rowid)

instance -- Identifies a unique connection to an OMNIDEX environment as established by oaconnect. Instance is a 32-bit signed integer passed by value as it was returned by oaconnect.

options -- Is a character string, passed by reference, that indicates the action or actions for oainsertindex to take. Terminate the option list with a semicolon or a null character.

status -- Indicates the success or failure of oainsertindex. A zero status.error means a successful call to oainsertindex. The status structure is passed by reference and contains fourteen 32-bit signed integers, followed by a 36-character buffer.

table -- Is a character value passed by reference, not longer than 33 bytes including a semicolon or null terminator. Table contains the name of the table to which you are adding the row.

columns -- Is a character array passed by reference, not longer than 4096 bytes, that specifies those columns from table that will contain the data passed in buffer. Columns must contain column names separated by commas, in the order that they are defined for the table in the OMNIDEX environment catalog, or an asterisk ( * ) to represent all column names.

buffer -- Is an array passed by reference that contains the data that was added to the columns referenced in columns. This is the data that will be indexed. Buffer must equal the combined length of the columns referenced in columns. The data in buffer must be in native format. If columns references two columns: one 30-byte character column and one four-byte binary integer column, then buffer must reference a buffer that contains 30 bytes of character data followed by four bytes of binary integer data.

Binary data may require conversion when rows are transferred from the server to a client. For more information about byte-ordering, see “Byte ordering and byte boundaries”.

rowid -- The native identifying value for the row that was added. The size and type of this parameter depends on the database management system to which the row was added. See your database management system’s documentation for the correct type and size.

 

 

Options

CHAR=n -- Converts character values to correct binary format before inserting the index entry, where n is the byte length of the input number. The default is 32 bytes. The alphanumeric representation of the values is left justified and space-filled to length n.

 

 

Example

 

Top