short SetGlobalVariable(long QueryID, VARIANT Index, VARIANT Value)
Description
This function assigns a value to the specified host variable referenced by the query. The query should be a static query referencing host variables (stored with the QMF query or created by AddHostVariable()). Index can specify the numeric index of the host variable, or the name of the host variable.
Parameters
Name | Description |
---|---|
QueryID | The ID of the query, as returned from, InitializeStaticQuery(). |
Index | 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 value for the host variable. 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.