oaassignvalues is useful for eliminating
the overhead of the oaselect
process every time the retrieval criterion changes. By performing
oaselect outside the oaassignvalues/oafetch
loop, the selection process occurs only once. oaassignvalues
simply sets up the next row (or number of rows) for oafetch.
- oaassignvalues is useful in situations
where:
- the criteria are undetermined, as in an online query application.
- the criteria are too unwieldy to fit in the criteria parameter
of oaselect
- data is transferred across cursors.
Syntax
int oaassignvalues (cursor, *options, *status,
*label, num_values, *values)
cursor -- Is a 32-bit signed
integer. This is the value returned by a successful call to
oaopencursor and
used in the preceding call to oaselect.
options -- Is a 256 byte
maximum Character string. The options parameter is currently
reserved and must contain a semicolon or a null character
status -- Status returns
information about the success or failure of the oaassignvalues
routine. See Status Structure.
label -- Is a character value
passed by reference that contains an alphanumeric alias for
$VALUES. The label can be up to 32 characters long, enclosed
in single quotes, and must match the label used in the $VALUES
expression of oaselect
. It is used to resolve ambiguities in oaselect
statements where the oaselect
criteria contains several $VALUES expressions.
num_values -- Is a 32-bit
signed integer and passes the number of values contained in
the data parameter. num_values must be equal to or less than
the number of parameters specified for $VALUES in oaselect.
If no number parameter was specified for $VALUES in oaselect,
then num_values must be 1
values -- values is an array,
passed by reference, that contains n elements where n is the
value of num_values. Each element must be of a size and format
to contain a value, as specified by the $VALUES expression
of the preceding oaselect.
top
Options
There are currently no options available for use with oaassignvalues.
Support was added for future enhancements.
top
Example
top
|