User ( posted:

YES. If the data your query is searching for is no longer in the database
(or you are pointing at a different database that does not contain this
SQLRetreiveToFile() won't create a file if no data is returned by the

To find out what the problem is, try executing the query manually from an
ISQL Client or check the return value of SQLExecQuery(). If SQLExecQuery()
returns 0, it means result set contains no columns of data. If
SQLExecQuery() returns a negative value, it returned an error (use
SQLError to capture error info to an array and check elements (1,1), (1,2)
and (1,3) to see what the problem is). If SQLExecQuery() returns a
positive value, check the return value for SQLRetreiveToFile()