short SetParameter(long QueryID, VARIANT Index, VARIANT Value)
Description
This function assigns a value to the specified parameter. The value is passed to the stored procedure when the CALL statement is executed.
If your CALL statement takes one or more parameters, you should call this function to set the parameter values prior to calling ExecuteStoredProcedure() or ExecuteStoredProcedureEx().
Parameters
Name | Description |
---|---|
QueryID | The ID of the query, as returned from InitializeQuery(). |
Index | Either a number (variant type VT_I2) specifying the index of the host variable in the query, or a string (variant type VT_BSTR) specifying the name of the host variable. |
Value | The data value to substitute in the statement. To specify a null value, the type of the variant should be set to VT_EMPTY. |
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() or GetLastErrorType() to get additional error information.