short AddDecimalHostVariable(long QueryID, short Type, short Precision, short Scale, const VARIANT& Value)
Description
This function applies the data in Value to a variable in the static SQL statement initialized with QueryID. You call this function for each variable in the statement. QMF for Windows does not match values to variables, so you need to call this function in the same order as the variables in the SQL statement.
Parameters
Name | Description |
---|---|
QueryID | The ID of the query as returned from InitializeStaticQuery(). |
Type | The SQL data type of the value to be passed to the database server. This value influences the conversion of Value from a VARIANT data type to the value actually passed. The only valid value for AddDecimalHostVariable() is 484 (RSDT_DECIMAL). |
Precision | The precision of the decimal value. |
Scale | The scale of the decimal value. |
Value | The data value to substitute in the statement. To specify a null value, set the type of the variant to VT_EMPTY. |
Return Value
Zero if successful, nonzero if unsuccessful. If the return value is nonzero, you can call GetLastErrorString() or GetLastErrorType() for additional error information.