Anil's Blog is Best Viewed on GOOGLE CHROME

Friday, October 8, 2010

java.sql.SQLException: ORA-01008: not all variables bound

In case you are setting bind variables of VO associated with Poplist/MessageChoice .You may face this error.

Suppose you have a query like this in VO
select meaning, 
lookup_code
from fwk_tbx_lookup_codes_vl
where lookup_type = 'FWK_TBX_POSITIONS'
and meaning <> :1

Cause:  
  • You have not binded the View Object Query properly in any of the BC4J components(i.e. AM,VO or CO).
  • You have set View Defination property of messageChoiceBean.

Action: 
  •   Ensure before executing the VO query you are setting the bind variables :-
//VOImpl Code

public void initQuery()
  {
        setWhereClause(null);
        setWhereClauseParams(null);
        setWhereClauseParam(0,"Buyer");
        executeQuery();
  }
  • Instead of setting the View Definition property set the View Instance property of messageChoiceBean.


Thanks
AJ

1 comment:

  1. "Instead of setting the View Definition property set the View Instance property," was very helpful, thank you!

    ReplyDelete

Note: Only a member of this blog may post a comment.