Subject | RE: [IBO] Search question |
---|---|
Author | Nico Callewaert |
Post date | 2001-03-23T09:58:28Z |
Thank you Harald, I'm already working on it, :-)
Nico Callewaert
-----Oorspronkelijk bericht-----
Van: Harald Klomann [mailto:nibler@...]
Verzonden: vrijdag 23 maart 2001 10:54
Aan: IBObjects@yahoogroups.com
Onderwerp: Re: [IBO] Search question
Nico Callewaert wrote:
:NAME');
with / Containing
In the OnPrepare statement, just evaluate the switch, like :
if CheckBox1.Checked then
SQLWhereItems.Add ('UPPER (NAME) STARTING WITH :NAME');
else
SQLWhereItems.Add ('UPPER (NAME) CONTAINING :NAME');
Harald
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Nico Callewaert
-----Oorspronkelijk bericht-----
Van: Harald Klomann [mailto:nibler@...]
Verzonden: vrijdag 23 maart 2001 10:54
Aan: IBObjects@yahoogroups.com
Onderwerp: Re: [IBO] Search question
Nico Callewaert wrote:
>OnPrepare
> Hi,
>
> I have a form for searchedit connected to a query, in the
> statement, I have a line like this : .... SQLWhereItems.Add ('UPPER(NAME)
> STARTING WITH :NAME');would
> Now a user is asking me if it is possible to search for a string not
> starting with, but like a substring.
> I think I can solve it with : .... SQLWhereItems.Add ('UPPER (NAME) IN
> :NAME'); ???
> Right ?
> Do I need 2 SearchEdit components for it ? In case if, if the user
> switch between the 2 search modes, I guess I have to reprepare thestatement
> with the right SQLWhereItems clause ?Nico,
> Or is there a better way for this ?
>
> Thanks,
>
> Nico Callewaert
>
>> SQLWhereItems.Add ('UPPER (NAME) IN :NAME');This will not work, use SQLWhereItems.Add ('UPPER (NAME) CONTAINING
:NAME');
> But the problem then is, how will I make a difference between the 2,because
> user A will intend to look for a name STARTING WITH, and user B wouldlike
> to search on a substring in that name.Use a switch on your form, like a checkbox with the text maybe Starting
with / Containing
In the OnPrepare statement, just evaluate the switch, like :
if CheckBox1.Checked then
SQLWhereItems.Add ('UPPER (NAME) STARTING WITH :NAME');
else
SQLWhereItems.Add ('UPPER (NAME) CONTAINING :NAME');
Harald
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]