contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   SQLBindParameter    
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 variable was linked).
  • SQL_SUCCESS_WITH_INFO (the variable was linked, but a message was issued).
  • SQL_ERROR (an error occurred).
  • SQL_INVALID_HANDLE (the handle is invalid).

Declaration

  define external counter function SQLbindparameter
     (  read-only SQL_handle_type StatementHandle,
        value counter ParameterNumber,
        value counter InputOutputType,
        value counter ValueType,
        value counter ParameterType,
        value counter ColumnSize,
        value counter DecimalDigits,
        read-only SQL_array_type ParameterValue,
        value counter BufferLength,
        read-only SQL_array_type StrLen_or_Ind )


Purpose

Links a variable to a parameter marker in an SQL statement.

Input arguments:

  1. StatementHandle.
  2. ParameterNumber. The parameter number, ordered sequentially in increasing parameter order, starting at 1.
  3. InputOutputType. The type of parameter. The following values are allowed: SQL_PARAM_INPUT, SQL_PARAM_INPUT_OUTPUT, and SQL_PARAM_OUTPUT.
  4. ValueType. The C data type of the parameter. 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
  5. ParameterType. The SQL data type of the parameter. The following values are allowed:
    • SQL_UNKNOWN_TYPE
    • SQL_CHAR
    • SQL_NUMERIC
    • SQL_DECIMAL
    • SQL_INTEGER
    • SQL_SMALLINT
    • SQL_FLOAT
    • SQL_REAL
    • SQL_DOUBLE
    • SQL_DATETIME
    • SQL_VARCHAR
    • SQL_TYPE_DATE
    • SQL_TYPE_TIME
    • SQL_TYPE_TIMESTAMP
    • SQL_LONGVARCHAR
    • SQL_BIT
    • SQL_TINYINT
    • SQL_BIGINT
    • SQL_BINARY
    • SQL_VARBINARY
    • SQL_LONGVARBINARY
    • SQL_INTERVAL_MONTH
    • SQL_INTERVAL_YEAR
    • SQL_INTERVAL_YEAR_TO_MONTH
    • SQL_INTERVAL_DAY
    • SQL_INTERVAL_HOUR
    • SQL_INTERVAL_MINUTE
    • SQL_INTERVAL_SECOND
    • SQL_INTERVAL_DAY_TO_HOUR
    • SQL_INTERVAL_DAY_TO_MINUTE
    • SQL_INTERVAL_DAY_TO_SECOND
    • SQL_INTERVAL_HOUR_TO_MINUTE
    • SQL_INTERVAL_HOUR_TO_SECOND
    • SQL_INTERVAL_MINUTE_TO_SECOND
    • SQL_UNICODE
    • SQL_UNICODE_VARCHAR
    • SQL_UNICODE_LONGVARCHAR
    • SQL_UNICODE_CHAR
  6. ColumnSize. The size of the column or expression of the corresponding parameter marker.
  7. DecimalDigits. The decimal digits of the column or expression of the corresponding parameter marker.
  8. ParameterValue. The parameter data.
  9. BufferLength. The size of a single element in ParameterValue.
  10. StrLen_or_Ind. The length or indicator of data elements in ParameterValue.

Sample Code  
   ODBC data manipulation
 
Related Syntax
   SQLDescribeParam
   SQLExecDirect
   SQLExecute
   SQLFreeStmt
   SQLNumParams
   SQLParamOptions
   SQLPutData
 
  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.