Subject Re: [IBO] Adding OR condition to where clause
Author Jason Wharton
Andreas,

Sorry I didn't get to this sooner.

Actually, SQLWhereItems supports placing OR in it. You also have to add in
parenthesis.

The trick to it is, coordinating the search criteria and knowing how to
assemble it all.

I think you will need to show me a case and then I'll show you how to use
SQLWhereItems and then you can probably work to a full solution once your
understanding is in full.

Let me know.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Andreas Pohl" <apohl@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, May 02, 2001 3:13 AM
Subject: Re: [IBO] Adding OR condition to where clause


> According to IBO help and my experiences SQLWhereItems and original where
> stuff (like search criterias) are always connected with AND. That might be
> true in most cases. But I need to "soften" users search criterias without
> losing IBO's in-form-searching-capabilities.
>
> I would suggest to modify parsing algorithm in that way, that IBO omits to
> add AND operator in case of first line of SQLWhereItems is OR or AND.
Jason,
> is there a way to support necessarily modifications made by me?
>
> Mit freundlichem Gruss & Best Regards
>
> Andreas Pohl
> apohl@...
> www.ibp-consult.com
> ----- Original Message -----
> From: "Geoff Worboys" <geoff@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Tuesday, May 01, 2001 5:17 AM
> Subject: Re: [IBO] Adding OR condition to where clause
>
>
> > > Here is IBO too smart for my needs :)
> >
> > What you need to do is to use SQLWhereItems or SQLWhereHigh/Med/Low in
> > the OnPrepareSQL event handler. (nb. SQLWhereItems are the same
> > stringlist as SQLWhereMed). These strings are only valid during that
> > phase and are not saved for future prepares.
> >
> > When you use the AddSQLWhereClause function you are adding permanently
> > to the SQL statement - so if you call this function with every prepare
> > you will get duplicate entries, as you have found.
> >
> > HTH
> >
> > Geoff Worboys
> > Telesis Computing
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>