Skip to Content
0
Former Member
May 12, 2008 at 12:16 PM

SAPbouiCOM.Conditions - need help

379 Views

hi all

how can i use brackets on 'SAPbouiCOM.Conditions'

the code below is working properly

oConds = new SAPbouiCOM.Conditions();

oCond = oConds.Add();

oCond.Alias = "CardCode";

oCond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

oCond.CondVal = cardvalue;

oDBDataSource.Query(oConds);

but when i put more than one condition its not working. example below

oConds = new SAPbouiCOM.Conditions();

oCond = oConds.Add();

oCond.Alias = "CardCode";

oCond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

oCond.CondVal = cardvalue;

oCond.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;

oCond.Alias = "DocStatus";

oCond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

oCond.CondVal = "O";

oDBDataSource.Query(oConds);

please any one one know why its not working

Thanks