Subject Re: [firebird-support] How to make queries to a temporary result set
Author HECTOR RIOS
Hi Mercea,
Currently, I´m using Developer Express grid control and can do as you suggest, but I´m more interested to know if Firebird supports the temporary result set.
Regards,
Hector Rios


________________________________
From: Mercea Paul <paul.mercea@...>
To: firebird-support@yahoogroups.com
Sent: Saturday, September 22, 2012 3:48 AM
Subject: Re: [firebird-support] How to make queries to a temporary result set



 

On 2012.09.21 10:12 PM, HECTOR RIOS wrote:
>
> Hi,
> I´m trying to save some sql parsing in a Delphi application by using
> temporary result sets. Is there such thing in Firebird?
> For example: some user makes a query with some filters and then wants
> to make another query over results from previous query.
> It would be easy if added the filters over the result set without
> having to mix previous filters plus last query´s filters.
> Anybody has an easy alternative for this?
>
You can run the query with the new filter or if you have a dataset
populated from first query you can filter data from dataset with filter
condition without interrogating again the server, this is from UI controls.
I don't know equivalent in Delphi but from c# i can do:

private void tbFilter_KeyUp(object sender, KeyEventArgs e)
{
if (tbFilter.Text.Length > 0)
{
bsProducts.Filter = "PRODUCTNAME LIKE '%"+
tbFilter.Text+"%'";
}
else
{
bsProducts.Filter = "";
}
}
bsProducts is populated running the main query.

HTH,
Paul MERCEA

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]