contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   SQLGetData    
Sample Code   Related Syntax     Other Library Functions  

Library: ODBC
Include: omodbc.xin
Returns: Numeric

An SQL return code. The following values may be returned:

  • SQL_SUCCESS (the column data was retrieved).
  • SQL_SUCCESS_WITH_INFO (the column data was retrieved, but a message was issued).
  • SQL_ERROR (an error occurred).
  • SQL_INVALID_HANDLE (the handle is invalid).
  • SQL_NO_DATA (no data is available).
  • SQL_STILL_EXECUTING (the program is still executing).

Declaration

  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:

Sample Code  
   ODBC data manipulation
 
Related Syntax
   SQLBulkOperations
   SQLCancel
   SQLExecDirect
   SQLExecute
   SQLFetch
   SQLFetchScroll
   SQLPutData
   SQLSetPos
   SQLBindCol
 
  Other Library Functions
   SQL_FUNC_EXISTS
   SQL_LibraryVersion
   SQLAllocConnect
   SQLAllocEnv
   SQLAllocHandle
   SQLAllocStmt
   SQLBindCol
   SQLBindParameter
   SQLBrowseConnect
   SQLBulkOperations
   SQLCancel
   SQLCloseCursor
   SQLColAttribute
   SQLColAttributes
   SQLColumnPrivileges
   SQLColumns
   SQLConnect
   SQLCopyDesc
   SQLDataSources
   SQLDescribeCol
   SQLDescribeParam
   SQLDisconnect
   SQLDriverConnect
   SQLDrivers
   SQLEndTran
   SQLError
   SQLExecDirect
   SQLExecute
   SQLExtendedFetch
   SQLFetch
   SQLFetchScroll
   SQLForeignKeys
   SQLFreeConnect
   SQLFreeEnv
   SQLFreeHandle
   SQLFreeStmt
   SQLGetArrayAsCounter
   SQLGetArrayAsCounterShelf
   SQLGetArrayAsStream
   SQLGetArrayAsStreamShelf
   SQLGetArrayAsString
   SQLGetArrayElementCount
   SQLGetArrayElementLen
   SQLGetConnectAttr
   SQLGetConnectOption
   SQLGetCursorName
   SQLGetData
   SQLGetDescField
   SQLGetDescRec
   SQLGetDiagField
   SQLGetDiagRec
   SQLGetEnvAttr
   SQLGetFunctions
   SQLGetInfo
   SQLGetStmtAttr
   SQLGetStmtOption
   SQLGetTypeInfo
   SQLGetVectorAsCounter
   SQLGetVectorAsStream
   SQLGetVectorAsString
   SQLGetVectorSize
   SQLMoreResults
   SQLNativeSQL
   SQLNumParams
   SQLNumResultCols
   SQLParamOptions
   SQLPrepare
   SQLPrimaryKeys
   SQLProcedureColumns
   SQLProcedures
   SQLPutData
   SQLRowCount
   SQLSetArrayAsCounter
   SQLSetArrayAsCounterShelf
   SQLSetArrayAsStream
   SQLSetArrayAsStreamShelf
   SQLSetArrayAsString
   SQLSetArraySize
   SQLSetConnectAttr
   SQLSetConnectOption
   SQLSetCursorName
   SQLSetDescField
   SQLSetDescRec
   SQLSetEnvAttr
   SQLSetPos
   SQLSetScrollOptions
   SQLSetStmtAttr
   SQLSetStmtOption
   SQLSetVectorAsCounter
   SQLSetVectorAsStream
   SQLSetVectorAsString
   SQLSetVectorSize
   SQLSpecialColumns
   SQLStatistics
   SQLTablePrivileges
   SQLTables
   SQLTransact
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:18 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.