5 Replies Latest reply: Jan 22, 2013 2:59 AM by Neliel-Oracle-Newbie-Oracle RSS

    View Criteria Returns no query results

    Neliel-Oracle-Newbie-Oracle
      Hi,

      I have some doubt about what I am trying to implement about View Criteria in ADFBC so please kindly help me out.
      I have a view object that selects from a certain table. Notice no bind variable is in the query which is intentional.
      SELECT COLUMN1, COLUMN2, COLUMN3
      FROM PRODUCT
      ..and I have a view criteria called ProductGroupVC that will filter the view based on Product Group
       ( (GROUP_CODE = :GroupCode ) ) 
      ..and I have created a bind variable with this property
      :GroupCode
      Updatable = true
      Required = false
      ..and in application module code I wanted to apply the view criteria.
      ProductCodeViewImpl productIter = myAM.getProductCodeView();
      productIter.setApplyViewCriteriaName("ProductGroupVC");
      productIter.setNamedWhereClauseParam("GroupCode", "GC1");
      productIter.executeQuery();
      My problem is that my view object is not returning anything.
      I am not sure but did I miss something?

      I tried using the business component browser and tried to execute the view criteria and I am getting this
      Attempt to set a parameter name that does not occur in the SQL: GroupCode
      ..I just thought its possible to set a bind variable on the fly at runtime and append it at the base query. Kindly help clear my doubt please.

      Thanks to all..
      JDEV 11G PS5