Problem with using setWhereClause in ADF
542381Jan 23 2007 — edited Jan 23 2007Hi,
i am using the follwing code to insert a new record into DB.
public void updateCompany(String compName,String disable){
String amDef = "model.services.RebillService";
String config = "RebillServiceLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef, config);
ViewObject companyView = am.findViewObject("RebillCompanyNameView1");
companyView.setWhereClause("RebillCompanyName.REBILL_COMPANY_NAME=" +compName);
companyView.executeQuery();
when the last line gets executes, it throws oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. error.
This is the create statement that I get in the error page.
SELECT RebillCompanyName.ID, RebillCompanyName.REBILL_COMPANY_NAME AS REBILL_COMPANY_NAME1, RebillCompanyName.REBILL_COMPANY_DISABLE FROM REBILL_COMPANY_NAME RebillCompanyName WHERE (RebillCompanyName.REBILL_COMPANY_NAME=AirLiquide USA LLC) ORDER BY REBILL_COMPANY_NAME
I am not sure what is wrong with this query. When I copy, paste this query into my sql navigator, it works fine once I made the 'AirLiquide USA LLC' as a string.
But here as the data type is already a string ,I expected this statement to run without any error.
Could you please tell me if I am wrong anywhere?
Thanks,
Priya.S