contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   SQLBindCol    
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 columns and buffers are bound).
  • SQL_SUCCESS_WITH_INFO (the columns and buffers are bound, but a message was issued).
  • SQL_ERROR (an error occurred).
  • SQL_INVALID_HANDLE (the handle is invalid).

Declaration

  define external counter function sqlbindcol
     (  read-only SQL_handle_type StatementHandle,
        value counter ColumnNumber,
        value counter TargetType,
        read-only SQL_array_type TargetValue,
        value counter BufferLength,
        read-only SQL_array_type StrLen_or_Ind )


Purpose

Binds application data buffers to columns in the result set.

Input arguments:

  1. StatementHandle.
  2. ColumnNumber. The number of the result set column. Columns are numbered in increasing column order, starting at 0 if bookmarks are available. (Column 0 is the bookmark column.) 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
  4. TargetValue. The variable that will receive the fetched data.
  5. BufferLength. The length of the data buffer, in bytes.
  6. StrLen_or_Ind. The variable that will receive the length/indicator of the column data.

Sample Code  
   ODBC data manipulation
 
Related Syntax
   SQLDescribeCol
   SQLFetch
   SQLFetchScroll
   SQLFreeStmt
   SQLGetData
   SQLNumResultCols
   SQLSetArraySize
 
  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:16 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.