Sort of yes. Here is 2 methods.
1st. This would be a real hack  - create a descendant of TQuery
eg Save the current SQL statement and its parameters.
Generate the new SQL select statement and provide the parameters from the
locate parameters.
Run the query.
Restore the original SQL statement etc. Not a favoured method (have not
tried this one).

2nd Perhaps a  better method would to be to build a TQuery dynamically at
run time, using the above, and then switch the dataset being used on your
controls/whatever and switch back to the original when required (all smoke
and mirrors). eg change the value of the Datasource.Dataset.
This works like a dream.

Myles.



> -----Original Message-----
> From: Mark Derricutt [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 09, 1999 10:49 PM
> To:   Multiple recipients of list delphi
> Subject:      Re: [DUG]:  MSDE 1.0
> 
> On Thu, 9 Sep 1999, Nic Wise wrote:
> 
> > realtime. The only thing I removed was the type-and-search function, but
> > the user can still type a bit of a product code, hit enter, and have the
> > results reduced.....
> 
> Speaking of type-and-search type functions, is there ANY way to reproduce
> the Locate() function with a query component?  It's very handy and I wish
> I could do it.
> 
> --
> Mark Derricutt - Software Developer - http://www.chalice.gen.nz
> Getting jiggy with <no audio cd present>
> 
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to