long InitializeQuery(short SourceType, BSTR Source)
Description
This function sets the SQL text that you want to use in a query. You can pass the SQL text as a parameter to this function, read it from a text file, or obtain it from an existing query. Call Close() when you are finished with the query.
Parameters
Name | Description |
---|---|
SourceType |
Specifies the source for the SQL statement text as follows:
|
Source | A string containing the text, the owner and name (Owner.Name) of the query, or the name of a file containing the SQL text. |
Return Value
If successful, the ID of the query. If unsuccessful, a negative one (-1). Use this value in all interface calls that require the QueryID parameter.