FieldExpectedDataType (ODBCResultSet - LotusScript)
Gets or sets the data type for a column.
Defined in
Syntax
To get: dataType = odbcResultSet . FieldExpectedDataType( column )
To set: dataType = odbcResultSet . FieldExpectedDataType( column , dataType )
Parameters
column
Integer or string. Indicates the column number or name. When using integer, use any numeric data type, except Currency.
dataType
Constant. Indicates the data type to convert to: DB_TYPE_UNDEFINED, DB_CHAR, DB_SHORT, DB_LONG, DB_DOUBLE, DB_DATE, DB_TIME, DB_BINARY, DB_BOOL, DB_DATETIME.
Return Value
dataType
Constant. The data type of the column: DB_TYPE_UNDEFINED, DB_CHAR, DB_SHORT, DB_LONG, DB_DOUBLE, DB_DATE, DB_TIME, DB_BINARY, DB_BOOL, DB_DATETIME.
Usage
All field values are returned as they appear in the database.
An application may have special field value requirements; for example, it may need field values returned as strings. Some data type conversions are not possible; for example, returning names as real numbers. The returned value indicates the type that was set, which may differ from the requested type.
To determine the database data type, use FieldNativeDataType to return the data type as stored in the database for this column. Use FieldSize to return the field size at the database. Use FieldInfo, which contains all known field information, to return other field information.
If the expected field type is DB_BINARY, LotusScript raises a type mismatch error if the target variable is not Variant or String. (You must check for this LotusScript error as well as LS:DO errors.)
Errors
Field ID is out of range (DBstsINVC)