Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter EightData Functions (continued)

ODBCFetchAll Function

Overview

The ODBCFetchAll function copies the entire data set from the ODBC Results object to a two-dimensional array.

Syntax/Parameters

Syntax

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

Parameters

hResult

A handle value for a Result object from a successful ODBCQuery function call.

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.

Return Value

Returns a two-dimensional array of strings representing rows and columns or an empty array on failure. Use the GetLastError function to retrieve error information. The GetLastErrorMessage function may supply additional information.

Remarks

The ODBCFetchAll function should be called immediately after the ODBCQuery function. Data is retrieved from the current SQL cursor position so if any operations that read data are performed prior to this call, the data retrieval will start at that point.

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. If the columns names are too large to be key names, use the ODBCFetchColumnName or ODBCFetchColumnNames function to retrieve the name values.

Related Functions

Platform Support

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

Legato IDE