Savetofile for TMyQuery

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
heh
Posts: 11
Joined: Mon 04 Mar 2019 10:19

Savetofile for TMyQuery

Post by heh » Tue 15 Feb 2022 10:04

Hy,

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

There is a equivalent method ?

Thanks.

pavelpd
Devart Team
Posts: 80
Joined: Thu 06 Jan 2022 14:16

Re: Savetofile for TMyQuery

Post by pavelpd » 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

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!

heh
Posts: 11
Joined: Mon 04 Mar 2019 10:19

Re: Savetofile for TMyQuery

Post by heh » Mon 21 Feb 2022 08:51

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.

pavelpd
Devart Team
Posts: 80
Joined: Thu 06 Jan 2022 14:16

Re: Savetofile for TMyQuery

Post by pavelpd » Fri 11 Mar 2022 05:15

Hi!
Thanks for your inquiry!
We will investigate the performance of the TMyQuery.SaveToXML method and let you know about the results soon.
Regards,

heh
Posts: 11
Joined: Mon 04 Mar 2019 10:19

Re: Savetofile for TMyQuery

Post by heh » Mon 14 Mar 2022 12:46

Ok, Thank you.

faulknernolan
Posts: 2
Joined: Wed 20 Jul 2022 08:41

Re: Savetofile for TMyQuery

Post by faulknernolan » Wed 20 Jul 2022 08:44

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

pavelpd
Devart Team
Posts: 80
Joined: Thu 06 Jan 2022 14:16

Re: Savetofile for TMyQuery

Post by pavelpd » Wed 03 Aug 2022 05:55

Hi there!
You are always welcome.

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

Post Reply