FieldNativeDataType (ODBCResultSet - LotusScript)

Given a specific column, returns the native data type for that column.

Defined in

ODBCResultSet

Syntax

formatValue = odbcResultSet . FieldNativeDataType( column_id% )

or

formatValue = odbcResultSet . FieldNativeDataType( column_Name$ )

Parameters

column_id%

Integer. The ID of the column. Use any numeric data type, except Currency.

column_Name$

String. The name of the column.

Return value

Constant. One of the following:

  • SQL_CHAR
  • SQL_NUMERIC
  • SQL_DECIMAL
  • SQL_INTEGER
  • SQL_SMALLINT
  • SQL_FLOAT
  • SQL_REAL
  • SQL_DOUBLE
  • SQL_DATE
  • SQL_TIME
  • SQL_TIMESTAMP
  • SQL_VARCHAR
  • SQL_BINARY
  • SQL_VARBINARY
  • SQL_LONGVARCHAR
  • SQL_LONGVARBINARY
  • SQL_BIGINT
  • SQL_TINYINT
  • SQL_BIT

Usage

The native data type is that of the field as stored in the database but expressed in ODBC-standard terms. The data type of the returned data value is the value set by the expected data type. If the expected type is not set, data is converted to the LotusScript data type that most closely resembles the native type.

Errors

Field ID is out of range (DBstsINVC)

Example