SQLSetArraySize
Full Description
swirl
Syntax
  define external function SQLSetArraySize
     (  read-only SQL_array_type Array,
        value counter ElementLen,
        value counter ElementCount )


Purpose

Allows you to specify the number of elements, and the size of each element, in the SQL_array_type opaque data type variable. The existing data buffer (if any) is freed.

Input arguments:

  • Array. The SQL_array_type variable to modify.
  • ElementLen. The length of a single element, in bytes.
  • ElementCount. The total number of elements.

The following code demonstrates how to initialize and set SQL array type variables:

  local SQL_Array_type Array
  local counter ElementCount
  local counter ElementLen

  set ElementCount to SQLGetArrayElementCount( Array )
  set ElementLen to SQLGetArrayElementLen( Array )
  output "Initial array element count  = %d(ElementCount)%n"
  output "Initial array element length = %d(ElementLen)%n"

  SQLSetArraySize( Array, 20, 5 )

  set ElementCount to SQLGetArrayElementCount( Array )
  set ElementLen to SQLGetArrayElementLen( Array )
  output "Current array element count  = %d(ElementCount)%n"
  output "Current array element length = %d(ElementLen)%n"

Copyright © OmniMark Technologies Corporation, 1988-1998.