Antwerp
Posts: 24
|
Posted: 05/31/2005, 12:21 PM |
|
I want to add an expression as the table parameter in the where clause of the data source. Here is my where clause that is to be added:
upper(first_name) like upper('%e.getPage().getHttpGetParams().getParameter("fname")%')
Can I use an expression like the above (e.getPage().....) in the where clause?
If yes, how do I concatenate (like '%" + e.getPage() + "%')
Thanks in advance.
|
|
|
sbwtxj
Posts: 27
|
Posted: 05/31/2005, 7:18 PM |
|
Hi,Antwerp
This program is to be added into Before Build Select Event of the Form(grid or record).
For example,
String s_khbh = e.getPage().getHttpGetParameter("s_khbh");
String s_fgsmc = e.getPage().getHttpGetParameter("s_fgsmc");
if (! StringUtils.isEmpty(s_khbh) && (s_fgsmc != null)) {
if (StringUtils.isEmpty(e.getCommand().getWhere()))
{ e.getCommand().setWhere(" s_khbh ="+s_khbh+" AND s_fgsmc ='"+s_fgsmc+"'"); }
}
else
{e.getCommand().setWhere( e.getCommand().getWhere()+.....); }
System.out.println("Where Clause = "+e.getCommand().getWhere()); //for system display the info.
_________________
----------------
Regards,
shanbw |
|
|
|