BindDecimalHostVariable()


" "

short BindDecimalHostVariable(BSTR CollectionName, BSTR PackageName, 
short SectionNumber, short Number, BSTR Name, short DataType, short Precision, short Scale)

Description

This function binds a variable in the specified section. Include the text ":H" in the SQL text as a placeholder for a host variable. For each decimal host variable in the SQL text, you should call BindDecimalHostVariable() to specify information about the variable.

Parameters


Name Description
CollectionName The collection ID of the package that you want to bind.
PackageName The name of the package that you want to bind.
SectionNumber The section number of the statement within the collection and package that you want to bind.
Number The identifier for the variable that you want to bind. The first variable in the SQL statement is variable 0. Each subsequent variable is numbered sequentially.
Name Used by the database server for diagnostic purposes. This value is not validated nor required by QMF for Windows.
DataType The SQL data type of the variable. The only valid value for BindDecimalHostVariable() is 484 (RSDT_DECIMAL).
Precision The precision of the decimal variable.
Scale The scale of the decimal variable.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. If the return value is non-zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.