CATable::GetSafeArray
ADE User Guide > ADE Server Class Reference > CATable
CATable::GetSafeArray( )
Retrieves the CATable as a safe array (i.e., a Visual Basic array, .NET array, etc). The ordering of the dimensions is controlled by the SetIndexOrder method. The elements of each dimension are indexed 1 to N, where N is the size of each index.
When you are reading an array with 2 or more dimensions, you should call SetIndexOrder first to ensure the order of dimensions in the result are in the order you would like.
If the result is an atom, returns Null (Safe arrays don't support 0-dimensional arrays) and sets the ErrorCode to 64 ("Value is atomic (not an array). To get value, use AtomicValue method."). In that case, use the CAEngine::AtomicValue() method to get the value.
Return value
Array -- if the result is an arary.
Null -- (with ErrCode = 64) if the result is an atom.
Example Usage
Visual basic code to get the contents as a VB array:
- dim Var As CAObject
- Dim curTable
- curTable = Var.GetSafeArray
Enable comment auto-refresher