base.SqlHandle.getResultType

Returns the Genero type name of a column in the result set produced by the SQL statement.

Syntax

getResultType( index INTEGER )
 RETURNING type STRING
  1. index is the ordinal position of the result set column (starts at 1).

Usage

Call the getResultType() method to query the type 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.

The type name is a string that represents a Genero type. For example, "INTEGER", "DECIMAL(10,2)", "DATE", "DATETIME YEAR TO SECOND".

Important: The type returned can differ, depending on the brand of database server used. The database driver provides the column type according to the described API of the client database software, which in turn queries the database server for the native type of the column. For example, if you create a table in the Genero program with a DATE type in a Oracle database, the resulting DATE native type in Oracle will correspond to a Genero type of DATETIME YEAR TO SECOND.

Example

FOR i=1 TO sh.getResultCount()
    DISPLAY sh.getResultType(i)
END FOR