Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

OmniAccess API

Functions

Syntax

Options

Example

 

OmniAccess API

Programming Basics

Managing Data

Functions

 

OAUPDATEINDEX

oaupdateindex, when used with a native routine to update rows, updates the key values for the specified table in the Omnidex indexes. Incorporating this routine into native update applications automatically maintains Omnidex indexes whenever a row is updated.

 

Syntax

oaupdateindex (instance, options, status, table, columns,
before_buffer, before_rowid, after_buffer, after_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 returned by oaconnect.

options -- Is a 256-byte character string, passed by reference, and terminated by a semicolon or a null character. It indicates the action(s) for oaupdateindex to take. The valid options are:

status -- Indicates the success or failure of the oaupdateindex routine. A zero status.error means a successful call to oaupdateindex. 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 where the updated row resides.

columns -- Is a character array not longer than 4096 bytes. Separate multiple columns with commas and terminate the array with a semicolon or null character. Columns specifies those columns from table that will contain the data passed in buffer. Columns should contain one or more column names.

before_buffer -- Is an array passed by reference that contains the data in the columns referenced in columns before the update. Before_buffer must equal the combined length of the columns referenced in columns. The data in before_buffer must be in native format. If columns references two columns, one 30-byte character column and one four-byte binary integer column, then before_buffer must reference a buffer that contains 30 bytes of character data followed by four bytes of binary integer data.

before_rowid -- Is the native identifying value for the row that was updated before the update. The size and type of this parameter depends on the database management system where the row was updated. Consult both your Omnidex Operating System Supplement and the Omnidex Database Integration Guide for details on how to get the row ID for a row in a given data management system.

after_buffer -- Is an array passed by reference that contains the data in the columns referenced in columns after the update. After_buffer must equal the combined length of the columns referenced in columns. The data in after_buffer must be in native format. If columns references two columns, one 30-byte character column and one four-byte binary integer column, then after_buffer must reference a buffer that contains 30 bytes of character data followed by four bytes of binary integer data.

after_rowid -- Is the native identifying value for the row that was updated. Note: If your data management system or programmatic locking guarantees that a row’s native ID will not change during an update, you can pass the same pointer as in before_rowid. Its size and type depends on the database management system to which the row was added. Consult both your Omnidex Operating System Supplement and the Omnidex Database Integration Guide for details on how to get the row ID for a row in a given data management system.

 

 

Options

CHAR=n -- converts character input to binary format, 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. For more information, see “The CHAR=n option”.

 

 

Example

 

Top