short Open(long QueryID, long RowLimit, BOOLEAN FetchAllRows)
Description
Use this function to run a query that uses the SELECT verb, by opening a cursor in the database for the query. Use FetchNextRow() or FetchNextRows() to retrieve the data for the query, and call Close() when you are done.
If QMF for Windows is configured to fetch all rows (see RSR_AUTOFETCHALLROWS in the description for GetResourceLimit()) or the FetchAllRows parameter is non-zero, QMF for Windows fetches all rows of the result set into its internal buffer before returning from this call.
Parameters
Name | Description |
---|---|
QueryID | The ID of the query, as returned from InitializeQuery() or InitializeStaticQuery(). |
RowLimit | A number indicating the maximum number of rows to retrieve from the database. Zero indicates that no limit is enforced except for the row limit established by the QMF for Windows Administrator program. |
FetchAllRows | A Boolean value that indicates whether all rows in the result set are fetched into QMF for Windows's internal buffer. If non-zero, all rows are fetched, closing the cursor and freeing the database for other users. This is the same as calling CompleteQuery(). |
Return Value
Return value will be zero if successful or non=zero if unsucessful. If the return value is non=zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.
Related Tasks