SQLGetData
Full Description
swirl
Syntax
  define external counter function SQLGetData
     (  read-only SQL_handle_type StatementHandle,
        value counter ColumnNumber,
        value counter TargetType,
        modifiable stream TargetValue,
        value counter BufferLength,
        modifiable counter StrLen_or_Ind )


Purpose

Retrieves data for a single column in the result set. It can be called many times to retrieve variable-length data in parts.

Input arguments:

  1. StatementHandle.
  2. ColumnNumber. The number of the result set column. Columns are numbered in increasing column order starting at zero (column 0 is the bookmark column), if bookmarks are available. Otherwise, column numbers start at 1.
  3. TargetType. The C data type of the result data. The following values are allowed:
    • SQL_C_DEFAULT
    • SQL_C_NUMERIC
    • SQL_C_CHAR
    • SQL_C_LONG
    • SQL_C_SHORT
    • SQL_C_FLOAT
    • SQL_C_DOUBLE
    • SQL_C_DATE
    • SQL_C_TIME
    • SQL_C_TIMESTAMP
    • SQL_C_TYPE_DATE
    • SQL_C_TYPE_TIME
    • SQL_C_TYPE_TIMESTAMP
    • SQL_C_INTERVAL_YEAR
    • SQL_C_INTERVAL_MONTH
    • SQL_C_INTERVAL_DAY
    • SQL_C_INTERVAL_HOUR
    • SQL_C_INTERVAL_MINUTE
    • SQL_C_INTERVAL_SECOND
    • SQL_C_INTERVAL_YEAR_TO_MONTH
    • SQL_C_INTERVAL_DAY_TO_HOUR
    • SQL_C_INTERVAL_DAY_TO_MINUTE
    • SQL_C_INTERVAL_DAY_TO_SECOND
    • SQL_C_INTERVAL_HOUR_TO_MINUTE
    • SQL_C_INTERVAL_HOUR_TO_SECOND
    • SQL_C_INTERVAL_MINUTE_TO_SECOND
    • SQL_C_BINARY
    • SQL_C_BIT
    • SQL_C_SBIGINT
    • SQL_C_UBIGINT
    • SQL_C_TINYINT
    • SQL_C_SLONG
    • SQL_C_SSHORT
    • SQL_C_STINYINT
    • SQL_C_ULONG
    • SQL_C_USHORT
    • SQL_C_UTINYINT
    • SQL_C_BOOKMARK
    • SQL_C_VARBOOKMARK
    • SQL_C_TINYINT
    • SQL_C_VARBOOKMARK
    • SQL_ARD_TYPE
    • SQL_C_DEFAULT
  4. BufferLength. The maximum length of TargetValue.

Output arguments:

  • TargetValue. A pointer to the buffer in which to return the data.
  • StrLen_or_Ind. The length of data available for return, or the data indicator value (SQL_NULL_DATA or SQL_NO_TOTAL).

Copyright © OmniMark Technologies Corporation, 1988-1998.