base.SqlHandle.getResultName
Returns the name of a column in the result set produced by the SQL statement.
Syntax
getResultName( index INTEGER )
RETURNS STRING
- index is the ordinal position of the result set column (starts at 1).
Usage
Call the getResultName()
method to query the name of a column in the result set,
after executing the SQL statement with the open()
method and fetching a row with fetch()
.
The method takes the position of the column as the parameter.
Example
DEFINE sh base.SqlHandle, i INT
...
FOR i=1 TO sh.getResultCount()
DISPLAY sh.getResultName(i)
END FOR
For a complete example, see Example 2: SqlHandle with result set SQL.