4 Replies Latest reply on Nov 10, 2006 9:30 AM by 506087

    Vo based on where like clause

    506087
      Hi All,

      In my Vo the query is:-
      select empno,ename from emp where ename like :1

      now i am setting the variable in VO as follows:-
      setWhereClauseParams(null);
      setWhereClauseParam(0, empNameKey);
      executeQuery();

      But i am getting an error :-
      SQL error during statement preparation. Statement: select empno,ename from emp where ename like :1

      Please Help me in solving this problem.

      Thanks,
      Vikram
        • 1. Re: Vo based on where like clause
          442947
          Provide the detail#0 part of the error stack.
          • 2. Re: Vo based on where like clause
            506087
            Exception Details.

            oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: select empno,ename from emp
            where ename IS NOT NULL and
            ename like :1
                 at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
                 at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1064)
                 at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2651)
                 at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2459)
                 at OA.jspService(OA.jsp:48)
                 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
                 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
                 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
                 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
                 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
                 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
                 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
                 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
                 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
                 at java.lang.Thread.run(Thread.java:534)
            ## Detail 0 ##
            java.sql.SQLException: ORA-01008: not all variables bound

                 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
                 at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
                 at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
                 at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
                 at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol
            • 3. Re: Vo based on where like clause
              442947
              You said your query is select empno,ename from emp where ename like :1
              but the query in the exception says select empno,ename from emp
              where ename IS NOT NULL and ename like :1, are you binding the correct vo instance ?
              • 4. Re: Vo based on where like clause
                506087
                yes i am in working in Right VO,i just addded that not null condition also