Page 1 of 1

Savetofile for TMyQuery

Posted: Tue 15 Feb 2022 10:04
by heh
Hy,

I would like use tmyquery.Savetofile like Tadoquery but i can not found this method.

There is a equivalent method ?

Thanks.

Re: Savetofile for TMyQuery

Posted: Fri 18 Feb 2022 11:52
by pavelpd
Hi there!

MyDAC supports data export to XML format using the TMyQuery.SaveToXML method. You can find more details about this method in our documentation (please note that you can implement data export to other formats from your side):
http://www.devart.com/mydac/docs/index. ... toxml.htm

Kindly note that if you want to save a query execution result, and then open it - you can do it using the VirtualTable component. You can use methods SaveToFile and LoadFromFile for data loading and saving in VirtualTable on all the supported platforms (please note that data will be saved as binarie).

You can assign a TMyQuery to a TVirtualTable. You can read about to fill TVirtualTable with data from another TDataSet component in the VirtualTable help: https://www.devart.com/virtualdac/docs/ ... ject).htm

For example:

Code: Select all

VirtualTable.Assign(MyQuery); 
Should you have any questions, do not hesitate to ask!

Re: Savetofile for TMyQuery

Posted: Mon 21 Feb 2022 08:51
by heh
Hi,

I'm already using Myquery.SaveToXml and load to a VirtualTable, but the performance is not high for save to xml.

Adoquery.savetoFile('myfile.vtd") is so fast and the size of the file very small.

I didn't found the implementation of savetoxml.

"(please note that you can implement data export to other formats from your side)"
I didn't found how to do that.

Thank you.

Re: Savetofile for TMyQuery

Posted: Fri 11 Mar 2022 05:15
by pavelpd
Hi!
Thanks for your inquiry!
We will investigate the performance of the TMyQuery.SaveToXML method and let you know about the results soon.
Regards,

Re: Savetofile for TMyQuery

Posted: Mon 14 Mar 2022 12:46
by heh
Ok, Thank you.

Re: Savetofile for TMyQuery

Posted: Wed 20 Jul 2022 08:44
by faulknernolan
pavelpd wrote: Fri 18 Feb 2022 11:52 Hi there!

MyDAC supports data export to XML format using the TMyQuery.SaveToXML method. You can find more details about this method in our documentation (please note that you can implement data export to other formats from your side):
http://www.devart.com/mydac/docs/index. ... toxml.htm fall guys

Kindly note that if you want to save a query execution result, and then open it - you can do it using the VirtualTable component. You can use methods SaveToFile and LoadFromFile for data loading and saving in VirtualTable on all the supported platforms (please note that data will be saved as binarie).

You can assign a TMyQuery to a TVirtualTable. You can read about to fill TVirtualTable with data from another TDataSet component in the VirtualTable help: https://www.devart.com/virtualdac/docs/ ... ject).htm

For example:

Code: Select all

VirtualTable.Assign(MyQuery); 
Should you have any questions, do not hesitate to ask!
Thanks for your reply

Re: Savetofile for TMyQuery

Posted: Wed 03 Aug 2022 05:55
by pavelpd
Hi there!
You are always welcome.

Should you have any product related questions, do not hesitate to ask!