Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

OmniAccess API

Functions

Syntax

Options

Example

 

OmniAccess API

Programming Basics

Managing Data

Functions

 

OADELETE

oadelete must be preceded by an oafetch call. It deletes the current row for the cursor. By default, it automatically updates the Omnidex indexes to reflect the deletion of a row. By default, oadelete waits until the file (table) referenced in table is accessible then locks it. It then rereads the row, to ensure that it hasn’t been updated since the fetch, before deleting it.

By default, when you delete a row from a table using oadelete, that row’s key values are also deleted from the Omnidex indexes.

oadelete may not be supported for some data management systems. If your DBMS is not supported for oadelete, use native updates and oadeleteindex. This prevents the OmniAccess search routines from “finding” rows that were deleted and no longer exist.

This feature maintains OMNIDEX index integrity as rows are deleted. When deleting a high volume of rows from a table, it is often more efficient to perform data-only deletions, using the DA option, followed by a DBINSTAL BUILD operation.

 

Syntax

oadelete (cursor, options, status, table)

cursor -- Is a 32-bit signed integer passed by value. This is the value returned by a successful call to oaopencursor.

options -- Is a 256-byte character string, passed by reference, that indicates the action(s) for oadelete to take. Separate multiple options with commas and terminate the option list with a semicolon or a null character. The valid options are:

Passing a semicolon or a null character causes default behavior.

status -- Indicates the success or failure of the oadelete routine. A zero status.error means a successful call to oadelete. 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 not longer than 33 bytes, passed by reference and terminated with a semicolon or null character. Table contains the name of the table where the row to be deleted resides.

 

 

Options

DA -- the data-only option deletes the row only from the table. It does not delete the row’s key values from the OMNIDEX indexes.

NOWAIT -- returns an error condition if the table referenced in table is not available for locking. Without NOWAIT, OmniAcess queues the lock request until a lock can be placed before the deletion. For more information, see “The NOWAIT option”.

Passing a semicolon or a null character causes default behavior.

 

 

Example

 

Top