short FastSaveDataEx(long QueryID, Boolean Replace, BSTR TableName, BSTR TableSpaceName, BSTR Comment, long* NumRows)
Description
This function performs a fast save data process. The query is rerun at the database server and the results of the query are inserted directly into the specified table. If the table already exists, the new data should have the same number and types of columns as the existing table.
Parameters
Name | Description |
---|---|
QueryID | The ID of the query, as returned from InitializeQuery(). |
Replace | Non-zero indicates that the data will replace the existing data in the table. Zero indicates that the data will be appended to existing data in the table. |
TableName | The name of the table in which you want to store the data. If the table does not exist, QMF for Windows will create it. |
TableSpaceName | The name of the table space in which the table exists or will be created. If TableSpaceName is omitted or is an empty string, QMF for Windows will use the default table space. If you have configured QMF for Windows to always use the default table space, this parameter is ignored. See RSR_SDDIFFERENTTS in the description for GetResourceLimit(). |
Comment | Optionally, a string that specifies a comment for the table in which the data is saved. |
NumRows | A pointer to a long integer containing the number of rows to fetch. If the number of unfetched rows in the result set is less than NumRows, NumRows is reset to the actual number of rows contained in the result. |
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(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.