Board index » cppbuilder » TQuery question.

TQuery question.


2003-12-18 03:44:00 AM
cppbuilder84
I have a bcb5 pro app that uses a TQuery and TDBGrid components to perform
an SQL query on my local paradox database and display the results. I want to
export the results of the query ( all the records) to different file types
such as HTTP and .CSV. How can I get the contents of all the rows and
collumns from either the TQuery or TDBGrid components in code so I can
create the necessage files.
Thanks
Jeff
 
 

Re:TQuery question.

Hi Jeff,
There is no any TQuery method to do this job. You should walk through the records from first to last and fill up the file using the FieldByName("fieldname")->AsType property.
HTH
Jayme.
"Jeff Douglass" <.>wrote in message news:3fe0b29c$ XXXX@XXXXX.COM ...
Quote
I have a bcb5 pro app that uses a TQuery and TDBGrid components to perform
an SQL query on my local paradox database and display the results. I want to
export the results of the query ( all the records) to different file types
such as HTTP and .CSV. How can I get the contents of all the rows and
collumns from either the TQuery or TDBGrid components in code so I can
create the necessage files.

Thanks

Jeff


 

Re:TQuery question.

"Jeff Douglass" <.>wrote in message
Quote
I have a bcb5 pro app that uses a TQuery and TDBGrid components to perform
an SQL query on my local paradox database and display the results. I want
to
export the results of the query ( all the records) to different file types
such as HTTP and .CSV. How can I get the contents of all the rows and
collumns from either the TQuery or TDBGrid components in code so I can
create the necessage files.

Thanks

Jeff
There are shareware components that can do this e.g.
www.torry.net/db_bdeexport.htm
 

{smallsort}

Re:TQuery question.

Take a look at www.scalabium.com there is a component for do what u
need...
HTH, Francesco
Jayme Jeffman Filho wrote:
Quote
Hi Jeff,

There is no any TQuery method to do this job. You should walk through
the records from first to last and fill up the file using the
FieldByName("fieldname")->AsType property.

HTH

Jayme.

"Jeff Douglass" <.>wrote in message
news:3fe0b29c$ XXXX@XXXXX.COM ...
>I have a bcb5 pro app that uses a TQuery and TDBGrid components to
>perform an SQL query on my local paradox database and display the
>results. I want to export the results of the query ( all the
>records) to different file types such as HTTP and .CSV. How can I
>get the contents of all the rows and collumns from either the
>TQuery or TDBGrid components in code so I can create the necessage
>files.
>
>Thanks
>
>Jeff
>
>