Subject RE: [IBO] SQLWhereItems->Add - Problem
Author Daniel Jimenez
Hi Helen,

Thank you for your help.

I made the change you suggested so that the code looks like:

if( !FPrivateRecords )
crsCVDBCursor->SQLWhereItems->Add("OR (R_SHARED = 1)");

However, I am still having the same problem, The parser is still placing an
(AND) before the (OR), as you can see from the IB_Monitor output below:

SELECT *
FROM
LOGPAS
WHERE (

R_CREATED_BY =?/*CURRENT_USER*/
)
AND OR(R_SHARED = 1)
FOR UPDATE

Is there any other area in which I could have messed up which I should be
looking into?

Daniel

____________________________
Comvision Pty. Ltd.

www.comvision.net.au



>I am also making use of:
> onPrepareSQL(TIB_Statement *Sender)
> {
> if( !FPrivateRecords )
> {
> crsCVDBCursor->SQLWhereItems->Add("OR");
> crsCVDBCursor->SQLWhereItems->Add("R_SHARED = 1");
> }
> }

Change this to
crsCVDBCursor->SQLWhereItems->Add("OR (R_SHARED = 1)");