Board index » delphi » query within a query

query within a query

Is there a workaround for Delphi's inability to write a query based on other
queries?

Thanks in advance.

 

Re:query within a query


Hi Tom,
you can put the query result into a permanent table and
query the table. See DbiQInstantiateAnswer function
in BDE API help.
--
Roman
(please remove STOPSPAM. in header)
URL:  www.rksolution.cz (Delphi corner)
MAIL: I...@rksolution.cz

Quote
Tom Nazelli wrote in message <6ubfme$12...@forums.borland.com>...
>Is there a workaround for Delphi's inability to write a query based on
other
>queries?

>Thanks in advance.

Re:query within a query


You will have to save the data to a table and query the table.  To save the
query data see the BDE API function DbiMakePermanent or use a BatchMove
component.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:query within a query


//don't forget to include BDE in your uses
procedure TForm1.Button1Click(Sender: TObject);
var
 h:hDBICur;
 ph:phDBICur;
begin
 Query1.Prepare;
 Check(dbiQExec(query1.StmtHandle,ph));
 h:=ph^;
 Check(DbiMakePermanent(h,'Permanent.dbf',True));
end;

Hope this is useful to you
Cezar Nechifor

Quote
Tom Nazelli wrote:
> Is there a workaround for Delphi's inability to write a query based on other
> queries?

> Thanks in advance.

Re:query within a query


On Thu, 08 Oct 1998 09:33:21 +0200, cezar nechifor <ce...@onix.ro>
wrote:

Quote
>//don't forget to include BDE in your uses
>procedure TForm1.Button1Click(Sender: TObject);
>var
> h:hDBICur;
> ph:phDBICur;
>begin
> Query1.Prepare;
> Check(dbiQExec(query1.StmtHandle,ph));  
> h:=ph^;
> Check(DbiMakePermanent(h,'Permanent.dbf',True));
>end;

I get an access violation error on the line

Check(dbiQExec(query1.StmtHandle,ph));  

 Any idea?

Other Threads