Board index » delphi » TQuery of a TQuery Result Set

TQuery of a TQuery Result Set

I've returned a result set using TQuery on a Paradox table which is
displayed to the user.  How can I use another TQuery on this result set to
do a sum of a column or do other manipulations?  The first result set does
not have to be saved but has to stay alive until user closes the window it
is displayed in.

Thanks for any assistance!

Bob

 

Re:TQuery of a TQuery Result Set


Quote
>I've returned a result set using TQuery on a Paradox table which is
>displayed to the user.  How can I use another TQuery on this result set to
>do a sum of a column or do other manipulations?

You will have to save the query to a table and then use that table in your
second query.  You can save the query like this
DbiMakePermanent(query1.handle, 'temp.db',true);
Unless you specify a full path the table is written to your PrivateDir
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:TQuery of a TQuery Result Set


I get a undeclared identifier "DbiMakePermanent" when I add the line.  Am I
missing the correct unit in my uses?  I already have Db, DbGrids, and
DbTables.

Thanks for the help.

Bob

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:d9519tsutsfm4a1fajplk62h0udccjb4f5@4ax.com...

Quote

> >I've returned a result set using TQuery on a Paradox table which is
> >displayed to the user.  How can I use another TQuery on this result set
to
> >do a sum of a column or do other manipulations?

> You will have to save the query to a table and then use that table in your
> second query.  You can save the query like this
> DbiMakePermanent(query1.handle, 'temp.db',true);

> Unless you specify a full path the table is written to your PrivateDir
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:TQuery of a TQuery Result Set


Quote
>I get a undeclared identifier "DbiMakePermanent" when I add the line.  Am I
>missing the correct unit in my uses?

Add BDE to your Uses
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:TQuery of a TQuery Result Set


thanks a bunch!  that worked great!  you TeamB guys are the best!

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:l8p39tkjuk4hs3coo6ikfl12firqn5g7f3@4ax.com...

Quote

> >I get a undeclared identifier "DbiMakePermanent" when I add the line.  Am
I
> >missing the correct unit in my uses?
> Add BDE to your Uses
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:TQuery of a TQuery Result Set


Hi,
I have the same problem with an interbase table.
After executing this command, the temp table is not written on the my disk.
I try to use this temp table to make another query but the BDE warn me this
message ": Table does not exist"
Thanks
Brian Bushay TeamB <BBus...@Nmpls.com> a crit dans le message :
d9519tsutsfm4a1fajplk62h0udccjb...@4ax.com...
Quote

> >I've returned a result set using TQuery on a Paradox table which is
> >displayed to the user.  How can I use another TQuery on this result set
to
> >do a sum of a column or do other manipulations?

> You will have to save the query to a table and then use that table in your
> second query.  You can save the query like this
> DbiMakePermanent(query1.handle, 'temp.db',true);

> Unless you specify a full path the table is written to your PrivateDir
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:TQuery of a TQuery Result Set


Quote
>I have the same problem with an interbase table.
>After executing this command, the temp table is not written on the my disk.
>I try to use this temp table to make another query but the BDE warn me this
>message ": Table does not exist"

 I do not believe it is supported for SQL tables.  
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads