|
||||||||||
|
||||||||||
Related Syntax | Other Library Functions |
function | SQLSetArrayAsCounter |
Library: omodbc - low-level ODBC support
Include: omodbc.xin |
define external function SQLSetArrayAsCounter ( read-only SQL_array_type Array, value integer ElementPos, value integer CounterValue )
Sets an element in the SQL_array_type variable's data contents to the specified integer value.
Input arguments:
The following code demonstrates how to use SQLSetArrayAsCounter
to set the integer value of an element in an SQL array type.
local SQL_Array_type Array local SQL_Array_type ArrayCopy local integer ArrayCounterValue local integer i SQLSetArraySize( Array, 20, 5 )
The following code checks the integer's initial values.
set i to 0 repeat set ArrayCounterValue to SQLGetArrayAsCounter ( Array, i ) output "Initial integer value[%d(i)] = %d(ArrayCounterValue)%n" increment i exit when i=5 again
The following code sets the integer values.
set i to 0 repeat set ArrayCounterValue to (i+1) SQLSetArrayAsCounter ( Array, i, ArrayCounterValue ) increment i exit when i=5 again
The following code checks the integer's current values.
set i to 0 repeat set ArrayCounterValue to SQLGetArrayAsCounter ( Array, i ) output "Current integer value[%d(i)] = %d(ArrayCounterValue)%n" increment i exit when i=5 again
---- |