How Save Query result to DBF?
Posted on 1997-11-06
In my application, my users are constantly asking for new information and reports faster than I can generate them. So I set up a simple SQL-interface. I just write the SQL template for them, and have a module that loads and executes them (executes the query, not the user). So far, I
have a dataset pointing to the TQuery, so they can SEE the result set.
But now they need to save the results off somewhere else, and it needs to be in the DBF format so they can use Excel to get at the data and do whatever they want.
QUESTION: After a Query is opened, how do I copy the result set off to a DBF table? The structure of the query result my vary, so I can't pre-create a table to have the answers coppied into them via UpdateSQL. I imagine there must be some simple call that I'm missing.