The standard methods include the methods of java.sql.ResultSet, which use the flat column model. The primary methods in this set are described below.
The following method advances the ResultSet cursor to the next row:
Syntax
boolean next()
The following method closes the ResultSet:
Syntax
void close()
For output ResultSet objects, the close() method may be called to close the ResultSet before all the rows have been fetched. No other AppServer method can be called until all the rows are fetched or close() is called.
The following method returns the value of the column identified by the 1-based columnNum:
Syntax
Object getObject(int columnNum)
The data type of the returned object is the default data type of the column. For example, the default data type for an ABL CHARACTER field is java.lang.String. For more information, see Data type mapping for temp-table fields.
The following method returns the value of the column identified by the fieldName:
Syntax
Object getObject(String fieldName)
The data type of the returned object is the default data type of the field. For example, the default data type for an ABL CHARACTER field is java.lang.String. For more information, see Data type mapping for temp-table fields.
The following method returns the value of the column identified by the 1-based columnNum:
Syntax
DataType getDataType(int columnNum)
DataType is the name of the data type, for example, String getString(), Integer getInteger(), and so on.
The following method returns the value of the column identified by the fieldName:
Syntax
DataTypegetDataType(String fieldName)
DataType is the name of the data type; for example, String getString(), Integer getInteger(), and so on.
If the specified return DataType is different from the default data type of the column, the Open Client takes one of the following actions:
The value is automatically converted from the default data type to DataType
An exception is thrown with a message explaining that the conversion is not supported
For example, if the ABL data type is INTEGER and its value is 10, getString(columnNum) automatically converts the value from Integer to the java.lang.String, "10". If the application calls getDate(columnNum), an exception is thrown with the message that an Integer value cannot be converted to Date. For information on the supported conversions, see Providing metadata for INPUT TABLE-HANDLE parameters.