Chris,

1. If you have only one dynamic criteria you could use:

theDO.addDynamicCriterion("<your column_name>",
CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR(or other option), <your
criteria>);

theDO is the handle to your DataObject

2. If you have more than one criteria then create a string(say mySQL) with
the clause, e.g.,

String mySQL = "(support_personnel.support_level = 'S'" + " AND
support_personnel.fk_emp_id = " + theEmpID + " )";

and apply it to the dataobject with:

theDO.addDynamicStrCriterion(mySQL)


In both cases remember to clear any existing criteria on the dataobject
before applying a new one by doing:

theDO.clearDynamicCriteria();

-Nimmi

-----Original Message-----
From: Chris Russell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 04, 1999 8:17 PM
To: [EMAIL PROTECTED]
Subject: [ND] How to dynamically add a where clause to a data object?



I have a data object that I use to retrieve the values used to populate a
list box.
  Before the page with this list box displays, I want to test for some
criteria and
 then dynamically add a "where" clause to the data object.  Can anyone tell
me how
 to add the where clause?
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to