Subject | RE: [IBO] SQLWhereItems->Add - Problem |
---|---|
Author | Daniel Jimenez |
Post date | 2004-10-12T22:04:11Z |
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
crsCVDBCursor->SQLWhereItems->Add("OR (R_SHARED = 1)");
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:Change this to
> onPrepareSQL(TIB_Statement *Sender)
> {
> if( !FPrivateRecords )
> {
> crsCVDBCursor->SQLWhereItems->Add("OR");
> crsCVDBCursor->SQLWhereItems->Add("R_SHARED = 1");
> }
> }
crsCVDBCursor->SQLWhereItems->Add("OR (R_SHARED = 1)");