By default we can create the bind variable for view object declaratively and set it value programmatically using
ViewObject viewobj = am.findViewObject(“voname”);
viewobj.setNamedWhereClauseParam(“depid”,123);
viewobj.executeQuery();
Dynamic Bind Variable
now suppose you want managerid as bind variable runtime.
viewobj.setWhereClause(“ManagedId = :managerid”); //:managerid is bind var
viewobj.defineNamedWhereClauseParam(“managerid”,null ,null);
viewobj.setNamedWhereClauseParam(“managedid”,234)
viewobj.executeQuery();
Hi use of Dynamic bind variable is giving
ReplyDeleteoracle.jbo.InvalidOperException: JBO-25070: Where-clause param variable type needs ordinal index array.