Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to save the result of a query

Status
Not open for further replies.

DCMNBD

Technical User
Jan 26, 2005
6
TG
Hi,

I m using Delphi 5
I have these componant on my form: Datasource, ADOTable, and ADOQuery

I want to save the result of an ADO query ADOQuery1 as a table (TableQuery1.mdb) so that I can used it later as the DataSource of a new query ADOQuery2.

Best Regards.
 
click on the TADOQuery component and press F1
click on methods and scroll down to SaveToFile

ive never used the TADO components but from what i read its what your after.

Aaron Taylor
John Mutch Electronics
 
Different solutions.
One may be: use a 'virtual table'.
Find a free virtual table component and use it. As an example from
Code:
AdoQuery1.open;
virtualtable1.assign(AdoQuery1);

So you have a table with the same record structure as the query and, more, all records in it.
You can save the virtual table, reload it when you like, assign to a datasource ....


Another similar solution (better... it depends on situations) is to use ClientDataSet but in this case you must distribute 'midas.dll' with your program.

Hope this can help
Giovanni Caramia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top