OAOPENCURSOR
oaopencursor establishes a working space or “cursor” that
maintains the environment for all OmniAccess procedure calls that reference
it.
A cursor defines the environment for qualifying, retrieving, updating
and deleting rows. An example of information identified by the cursor
includes the current pointer in a qualified subset after an oaqualify
operation. Through the use of multiple cursors, it is possible to simultaneously
read different qualified subsets for the same table. Cursor is passed
as the first parameter of most of the OmniAccess routines.
Syntax
oaopencursor (instance, options, status, cursor)
instance -- Identifies the
unique connection to a catalog established by calling oaconnect.
Instance is a 32-bit signed integer passed by value.
options -- Is the type of
access to be used by this cursor. Options is a character value
passed by reference, with a maximum length of 256 bytes, including
a semicolon or null terminator. The valid options values are:
status -- Returns information
about the success or failure of the oaopencursor routine.
A zero in status word 1 indicates a successful oaopencursor
call. The status structure is passed by reference and contains
fourteen 32-bit signed integers, followed by a 36-character
buffer.
cursor -- Is a 32-bit signed integer
passed by reference from oaopencursor. oaopencursor initializes cursor
to an integer that identifies a working area of the environment for subsequent
OmniAccess calls. If oaopencursor is not successful, cursor contains a
zero.
Options
DA -- causes all OmniAccess
calls for that cursor to affect only the underlying data files.
IA -- causes all OmniAccess
calls for that cursor to affect only the OMNIDEX index files.
IABASEID -- returns the TurboIMAGE
base ID to status.data5 to support subsequent calls to ImagePlus
intrinsics in that cursor.
OPTIMIZATION -- sets the
selection optimization for oaselects and oalists using this
cursor. Optimizations are set through an equation:
OPTIMIZATION='ASKQUAL,ASKRETRIEVAL'
The data access optimization you choose for oaselect supersedes
any optimization you may have chosen for the cursor when you
opened it with oaopencursor.
REQUIRED_OPTIMIZATION --
The Required Optimization feature enforces specified optimization
rules on a select statement. In the event that a select statement
cannot be optimized according to those rules, the select will
stop processing and return an error. Subsequent operations
against that select such as fetches and exports, will be disallowed.
Required optimizations are set through an equation:
REQUIRED_OPTIMIZATION='NO_MULTIFINDS,NO_UNOPTIMIZED_CRITERIA'
Example
Top
|