Compartilhar via


Mapeamento SQLSetParam

SQLSetParam continua a ser mapeado sobre SQLBindParameter como no ODBC 2. x. Embora seja conceitualmente semelhante ao SQLBindParam, o Gerenciador de Driver não mapeia SQLSetParam para SQLBindParam. Isso ocorre porque determinado ODBC 2 existente. x drivers usam o valor especial de BufferLength (SQL_SETPARAM_VALUE_MAX) que o Gerenciador de Driver gera quando mapeia SQLSetParam na parte superior de SQLBindParameter para determinar quando ele é chamado por um 1. x aplicativo ODBC.

Uma chamada para

SQLSetParam(hstmt, ipar, fCType, fSqlType, cbColDef, ibScale, rgbValue, pcbValue)  

resultará no seguinte:

SQLBindParameter(StatementHandle, ParameterNumber, SQL_PARAM_INPUT_OUTPUT, ValueType, ParameterType, ColumnSize, DecimalDigits, ParameterValuePtr, SQL_SETPARAM_VALUE_MAX, StrLen_or_IndPtr)