SQLSetArrayAsString Full Description |
|
Syntaxdefine external function SQLSetArrayAsString ( read-only SQL_array_type Array, value counter ElementPos, value stream StreamValue ) Purpose Sets an element in the data area of the SQL_array_type variable to the specified stream value. The input stream must contain only text data, with no embedded nulls. The stream length is identified by the end of the stream or the first detected null byte. Input arguments:
The following code demonstrates how to use local SQL_Array_type Array local SQL_Array_type ArrayCopy local stream ArrayStringValue local counter ArrayStringLen local counter i SQLSetArraySize( Array, 20, 5 ) In the following code, set i to 0 repeat set ArrayStringValue to SQLGetArrayAsString( Array, i ) set ArrayStringLen to (length of ArrayStringValue) output "Initial string value[%d(i)] = %g(ArrayStringValue) " output "(length = %d(ArrayStringLen))%n" increment i exit when i=5 again Next, set i to 0 repeat set ArrayStringValue to "*" ||* (i+1) || "%0#- post null" SQLSetArrayAsString( Array, i, ArrayStringValue ) increment i exit when i=5 again Finally, set i to 0 repeat set ArrayStringValue to SQLGetArrayAsString( Array, i ) set ArrayStringLen to (length of ArrayStringValue) output "Current string value[%d(i)] = %g(ArrayStringValue) " output "(length = %d(ArrayStringLen))%n" increment i exit when i=5 again |