🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by danid Tue, 07 Jun 2005 15:10
TADOQuery to XML file
#836
Author: danid
Date: Tue, 07 Jun 2005 15:10
6 lines
854 bytes
  Hello,

I there any way (method, API ...) to create a XML file having data in a TADOQuery?

Thanks,
Re: TADOQuery to XML file
#837
Author: Giuliano
Date: Tue, 07 Jun 2005 16:45
29 lines
1562 bytes
On 7 Jun 2005 08:10:07 -0700, "danid" <danid@nomail.com> wrote:

>
>  Hello,
>
>I there any way (method, API ...) to create a XML file having data in a TADOQuery?
>
>Thanks,

Hi,

   as TADOQuery is a descendant of TCustomADODataSet,
you can use the TCustomADODataSet::SaveToFile method,
which has the following prototype:

void __fastcall SaveToFile(
    const WideString FileName, TPersistFormat Format
);

The 2nd parameter (Format) could be set to pfXML.

However, try to use a TADODataSet instead of a TADOQuery, 
because TADOQuery adds nothing and exists only to facilitate 
the porting from old applications based on oldest technologies, 
e.g. the BDE.

Ciao

Giuliano
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads