CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Using expression as the table parameter

Print topic Send  topic

Author Message
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.
View profile  Send private message
sbwtxj


Posts: 27
Posted: 05/31/2005, 7:18 PM

Hi,Antwerp 8-)
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.