GetVariablesEx()


" "

short GetVariablesEx(long QueryID, short Index)

Description

This function returns the name of the variable in the query's SQL text referenced by the Index parameter. After calling this function, the Value property can be interrogated for the returned value. Assign values to this variable (and all others in the SQL text) by calling SetVariable() prior to running the query using either Open() or Execute().

Parameters

Name Description
QueryID The ID of the original query, as returned from InitializeQuery().
Index An index into the internal list of variables. Query the Value property for the string that corresponds with the index passed in. If there are no variables in the SQL statement, the function will return RS_ERROR_NO_DATA.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. If there are no variables in the SQL statement, the return value is RS_ERROR_NO_DATA (-1). If the return value is non-zero, you can call GetLastErrorString() or GetLastErrorType() to get additional error information.