Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EightData Functions (continued)

ODBCFetchArray Function

Overview

The ODBCFetchArray function returns the contents of the current row from an ODBC Results Object in the form of an array.

Syntax/Parameters

Syntax

string[] = ODBCFetchArray ( handle hResult, [boolean names] );

Parameters

hResult

A handle for a ODBC Results Object.

names

An option boolean flag indicating whether to add the column names (key names) to the array. Note that Legato allows key names of up to 64 characters. The default value is FALSE.

Return Value

Returns an array of strings representing the next row or an empty array on failure. Use the GetLastError function to retrieve error information. The GetLastErrorMessage function may supply additional information.

Remarks

The ODBCFetchArray function returns the current row within the ODBC Results Object. The function also increments the internal position within the object so that a subsequent call to the ODBCFetchArray function will return the next row (or, in the case of the ODBCFetchData function, data from the next row). Because of this, the ODBCNextRow function should not be used in conjunction with this function. If a column within the ODBC Results Object is empty, the corresponding slot within the returned array will be loaded with an empty string. If there was an error or no data can be retrieved, the number of used elements in the array will be reset to zero.

If requested, the column names are saved as key names for the second dimension of the returned array. The column names must comply with Legato key name syntax and size.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE