Getting bind variables

I have created a report from a SQL query. It has a bind variable in the query. I use the customization page with an LOV to set the bind variable. All this works fine. Now I want to display the value from the display_column when the report is run. Showing the query conditions displays the numeric return value which won't make much sense to the user. How do I get the value of the bind variable so I can display it?
Edited by: user478864 on Aug 31, 2010 12:12 PM

I use get_value('p_parameter_name') in the "after displaying the header" section (on the Additional PL/SQL Code tab) of a portal report to display the value of a parameter (bind variable) so you could probably use that as a starting point for some plsql to query up the display name based on the value in get_value('p_your_parameter').
DECLARE
BEGIN
htp.p(get_value('p_your_parameter'));
END;

Similar Messages

  • How to get binding variables from request

    We are trying to use html-db to develop an application which need to get values from user request to use in the queries, i.e. we will have pages depend on several binding variables and the value of these variables will be provided by the user through get/post request. Because the request will be initialed by another application so to use a form to collect the values is not an option.
    I am a html-db newbie. Does anyone here know how to do that?

    you're right in thinking this is a bit of a newbie html db question. it's a pretty straightforward matter to set up a report in html db that runs off of bind variables that can be set from a URL. you can see a pretty simple example on the first page of our "Sample Application" that's available to install into your workspace. try taking a look at that to see what i mean. you can install the Sample Application by clicking the "Review Demonstration Applications" link that's available right after logging into htmldb.oracle.com. that resulting screen lets you create (or re-create) the Sample App in your workspace. once it's installed, take a look at how the report on page 1 calls the first report on page 201. that report on 201 is dependent on a bind variable, :P202_CATEGORY, that's set from the URL. this particular URL is generated from the report on page 1, but it could just as easily have been generated from your other application. when you look at this example, the two key points to pay attention to are the 1) syntax used in the URL to set the bind variable (which is explained in our online help at http://htmldb.oracle.com/i/doc/mvl_fund005.htm#sthref357) and 2)the way in which that bind variable is referenced in the first sql query region on page 201. take a look at those when you get a chance, and let us know if you have further questions.
    thanks,
    raj

  • Get bind variables of a dynamic view object

    I seem unable to retrieve the bind variables for a dynamically created view object, even though I can do the same thing for a regular view object.
    Here is the code:
    newVO = repServ.createViewObjectFromQueryStmt("newQry",strSql);
    VariableValueManager vvm = newVO.ensureVariableManager();
    if (vvm != null)
    Variable vars[] = vvm.getVariables();
    vars will be empty, even though the sql statement in strSql has bind variables in it.
    Is there any way to determine the bind variables of a dynamic view object?
    Thanks!

    I got the same problem as yours and still could not find any way out.
    However, as I can see, you wanted to get VariableValueManager of newly created ViewObject that may be not available at this moment.
    If you find way to solve the problem, please help.
    Cheer,
    MinhTran

  • Problem with bind variable

    Hi,
    I need to get bind variables on SIEBEL to test the performance of query and my problem is on BIND :3 because it's impossible to interprete this.
    NAME     POSITION     LAST_CAPTURED     VALUE_STRING
    :1     1,00     02/17/2010 11:54:25     1-15BVYY
    :2     2,00     02/17/2010 11:54:25     
    :3     3,00     02/17/2010 11:54:25     W1B 1AH%
    :1     1,00     02/17/2010 12:48:04     1-15BVYY
    :2     2,00     02/17/2010 12:48:04     
    :3     3,00     02/17/2010 12:48:04     TQ3 3BJ%
    Thanks for your help

    I have no erros.
    I just want to get the real value of bind variable to run my query, but the problem is on bind 2.
    When i run this
    select name,position,last_captured,value_string
    from DBA_HIST_SQLBIND
    where sql_id='&SQLID'
    i obtain this
    NAME     POSITION     LAST_CAPTURED     VALUE_STRING
    :1     1,00     02/17/2010 11:54:25     1-15BVYY
    :2     2,00     02/17/2010 11:54:25     
    :3     3,00     02/17/2010 11:54:25     W1B 1AH%
    :1     1,00     02/17/2010 12:48:04     1-15BVYY
    :2     2,00     02/17/2010 12:48:04     
    :3     3,00     02/17/2010 12:48:04     TQ3 3BJ%
    What is the value of bind :2
    Thanks

  • How to bind variables to a LOV query

    Hi,
    I have a page with a messageLOVInput field. I have attached an external LOV with it. The query attached to the LOVregion has a bind parameter which should be replaced by the logged in Person's Business Group ID.
    I have done all the required LOV Mappings etc for a normal LOV.
    If I hardcode the business group ID and then run the page, its working fine. But if I want to bind the businessgroup id at runtime, I am getting an error saying "all variables not bound"
    I tried the usual method of calling some initMethod in AM from the CO of the external LOV region, and then calling some initQuery in the VO to set the bind parameter, but this doesn't work.
    How do I bind variables at runtime with the LOV VO ?
    Thanks, in advance !!
    -Debojyoty

    Hi Deb,
    Heres what you gotta do.
    By default the query is going to be executed in the EO . In case of a query without any bind variables this works fine. This is because for LOV EO's one doenst' have to explicitly call the the executequery method. In your case, there is one bind variable that needs to be set, before any query is fired, either implicitly or explicitly else you are going to get Bind variable not set exception.
    1. Define an init query method in your EOImpl.
    public void initQuery(String p_param)
    setWhereClause(null);
    setWhereClauseParams(null);
    setWhereClauseParam(0,p_param);
    2. Define a method for initializing the query. In your AM IMPL for the LOV, recieve the EOIMPL and call the initquery method and pass the parameter that you would to base the query upon.
    3. In the CO for the LOV, call the AMimpl Method defined in step 2.
    Let me know if this works ? If you still have problems, I will post some sample code.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh

  • Sqplus bind variables

    HI
    Can anyone help with why I am getting BIND variable undeclared please ?
    Here is my spec file:
    create or replace
    package  common as
    type recordList is RECORD
      recList VARCHAR2(100)
    type recordList_CV is ref cursor return recordList;
    PROCEDURE generateRecord(p_owner IN VARCHAR2, p_tableName IN VARCHAR2, recMainlist IN OUT recordList_CV);
    end;
    SQLPlus File:
    --variable o VARCHAR2(40);
    --variable t VARCHAR2(40);
    var rc refcusror;
    --:o := 'store';
    --:t := 'employees';
    rem exec common.generateRecord(:o,:t,:rec);
    execute common.generateRecord('store','employees',:rc);
    print rec;
    Output:
    SQL> @common_test.sql
    Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
                VARCHAR2 (n [CHAR|BYTE]) | NCHAR | NCHAR (n) |
                NVARCHAR2 (n) | CLOB | NCLOB | BLOB | BFILE
                REFCURSOR | BINARY_FLOAT | BINARY_DOUBLE ] ]
    SP2-0552: Bind variable "RC" not declared.
    SP2-0552: Bind variable "REC" not declared.

    > var rc refcusror;
    Check spelling.
    Also, REC not declared.

  • Can viewObject get a parameter from sessionScope to binding variable?

    hello,
    using Jdev11g ADF Fusion application
    Can viewObject get a parameter from sessionScope and assign into binding variable ? without using executeWithParameter
    Thanks
    greenApple

    A. Safwat,
    As I said before, I was not trying to be offensive, but simply to explain some of the shortcomings of one solution over another. One of the reasons people give such short answers is that many questions (including this one) have been asked and answered many many many times before on the forum. As to my reasons:
    1). Overkill - overkill because you are writing code to do what the framework already provides for you.
    2). Not bind-variable friendly - you are gluing in literals into a SQL statement. That means that Oracle will have to hard parse the query for each new value of the filter clause, yielding to poor performance, particularly in a multiuser environment. It should ideally be done using bind variables.
    3). Insecure (think about what happens if you put "'xyz' or 1=1" into the filterValue there) - not using bind variables is a security hole. Think through what happens if a filter criteria comes through like the one I mentioned.
    4). Inflexible - because you are overriding executeQueryForCollection, this VO becomes inflexible and can only be used in this particular place. Using the declarative approach outlined by Timo is more flexible
    5). Bad (ok, that's my opinion there) - OK, perhaps this was a bit offensive ;)
    Please don't take a critique of a post as offensive, as I assure you it was not intended to be in that spirit. As I mentioned, I greatly appreciate when people point out issues/problems/etc with my ideas, as that is the best way for me to learn. I have in the past written applications that were not bind-variable friendly, and I learned the downsides the hard way (system was horribly non-performant) - I wish someone had reviewed my approach and told me "bad idea" before the application made it into production.
    Respectfully,
    John

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • Getting error 025036 while setting bind variable value

    Hi,
    I have created a view object (ViewObj) having bind variable (Bind_Val).
    I am writing custom java method in AppModuleImpl.java, so that I can use that in serviceInterface.
    my method is:
    public void Met(String a){
    ViewObjImpl vo=new ViewObjImpl();
    vo.setBind_Val(a);
    I tried the below method also:
    public void Met(String a){
    ViewObjectImpl vo=new ViewObjectImpl();
    vo.setNamedWhereClauseParam("Bind_Val",a)
    But when I am running the AppModuleServiceImpl.java and select the Met method and pass the value for a. It is giving me error 02036.
    How to set the bind variable value in AppModuleImpl.java??
    Thanks,
    Rohit

    Hi Frank,
    Thanks for reply. It was helpful.
    Please go through the below mentioned two queries.
    My sql query is:
    SELECT Message.MESSAGE_ID,
    MessageProp.VALUE,
    MessageProp.MSG_PROP_ID
    FROM MESSAGE Message, MESSAGE_PROP MessageProp
    WHERE (MessageProp.Key='From' OR MessageProp.Key='To')AND Message.MESSAGE_ID = MessageProp.MESSAGE_ID And MessageProp.Value='B'
    and I have created one view criteria where I am giving the condition as MessageId=:Bind_MessageId.
    And then I am executing my findViewCriteria method from AppModuleServiceImpl where I am passing the value for Bind_MessageId and I am getting the output as I want.
    Now I am modifying my query as:
    SELECT Message.MESSAGE_ID,
    MessageProp.VALUE,
    MessageProp.MSG_PROP_ID
    FROM MESSAGE Message, MESSAGE_PROP MessageProp
    WHERE (MessageProp.Key='From' OR MessageProp.Key='To')AND Message.MESSAGE_ID = MessageProp.MESSAGE_ID And MessageProp.Value=:Bind_Value
    and setting the value for :Bind_Value programatically as:
    public void test(String s){
    ViewObjectImpl view = this.getViewObj1();
    VariableValueManager vm = view.ensureVariableManager();
    vm.setVariableValue("Bind_Value",s);
    **Note- I have written this custom method in AppModuleImpl.java class
    Then firstly I am executing test method from AppModuleServiceImpl to set the value for :Bind_Value. After that I am executing findViewCriteria method but then I am not getting any record.
    **Note-I am not getting any error.
    I want to set Bind_Value programatically and then I want to execute my FindViewCriteria from serviceInterface.
    Thanks,
    Rohit

  • Getting a bad bind variable error while compiling a custom form in R12

    Hi,
    I am getting a bad bind variable error while compiling a custom form.
    I tried setting the forms_path variable and I am still getting the error. Can anyone please suggest what can be done?
    DECLARE
    BEGIN
    IF :parameter.p_line_ship_to = 'T'
    THEN
    IF :SYSTEM.cursor_item = 'LINE.SHIP_TO'
    THEN
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    oe_lines.ship_to ('WHEN-VALIDATE-ITEM');
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    END IF;
    :parameter.p_line_ship_to := 'F';
    END IF;
    END;
    I am getting this error:
    Bad bind variable 'parameter.p_line_ship_to'

    The Parameter is not defined in the form.. But, this form is already been compiled and deployed.. I have to make some changes to the form and tried to compile it, when i am getting this error. Is it possible that the parameter would be defined in some other form or can this error be due to some other reasons?
    Thanks in Advance.

  • I am getting this error message "ORA-01006: bind variable does not exist.

    My code works fine like this:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE
    FROM R5EVENTS WHERE ROWID = :ROWID;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_JOBTYPE , 'X') IN ('BRKD','UNPLBRKD','FILTRA', 'LUB', 'FAC') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;
    But I want to change the code to include a record (ACT_TRADE) from another table(R5ACTIVITIES). I am getting this error message "ORA-01006: bind variable does not exist - POST-UPDATE 200Before Binding". Any help would be appreciated.
    DECLARE
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    V_CODE varchar2(8);
    V_EVENT varchar2(8);
    V_TRADE varchar2(8);
    BEGIN
    SELECT R5EVENTS.EVT_STATUS, R5EVENTS.EVT_FAILURE, R5EVENTS.EVT_CAUSE, R5EVENTS.EVT_ACTION, R5EVENTS.EVT_CODE, R5ACTIVITIES.ACT_EVENT, R5ACTIVITIES.ACT_TRADE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, V_CODE, V_EVENT, V_TRADE
    FROM R5EVENTS, R5ACTIVITIES WHERE V_CODE = :V_EVENT;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_TRADE , 'X') IN ('MTM','MTL','MTMGT', 'FTM', 'FTL', 'FTMGT', 'R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

    Thank you for your responses. Your feedback was helpful. This is what I ended up doing for a solution:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    v_GROUP varchar2(30);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE, USR_GROUP
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE, v_GROUP
    FROM R5EVENTS, R5USERS WHERE R5EVENTS.ROWID = :ROWID
    AND USR_CODE = O7SESS.CUR_USER;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(V_GROUP,'X') IN ('MTM','MTL','MTMGT','FTL','FTMGTS','PLANNER','DISPATCH','PMCOOR','R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

  • HELP: VO Bind variable gets lost, VO passivation checked!

    JDEv 10.1.3.0.4 + Struts/ADF
    I have a VO with one bind variable "accountId", this VO is the "root master" of the hierarchy => not a detail of a link.
    I added a method in the VO (that is part of one AM only) to set the bind variable:
      WHERE CLAUSE:
    (Wevent.EVENT_ID = WeventDesign.EVENT_ID) AND (Wevent.ACCOUNT_ID = AccountOwner.ACCOUNT_ID) AND (Wevent.PHOTOGRAPHER_ACCOUNT_ID = AccountPhotoGrapher.ACCOUNT_ID) AND (Wevent.EVENT_STATUS BETWEEN 30 AND 80) AND (Wevent.ACCOUNT_ID = :0)
      Binding Style: Oracle Positional
      private Number accountId = null;
      private Object[] DEFAULT_VALUES = new Object[]{ Constants.NUMBER_ZERO };
      private static int NUM_DEFAULT_VALUES = DEFAULT_VALUES.length;
      public Row setAccountId(Number newAccountId)
        Row row = null;
        if (newAccountId == null)
        this.accountId = null;
        this.clearCache();
        System.out.println(getClass().getName()+".setAccountId no exeqry newAccountId == null");    
        else
          this.accountId = newAccountId;
          row = this.getCurrentRow();
          if(row == null || row.getAttribute("AccountId") == null || !newAccountId.equals(row.getAttribute("AccountId")))  
    // not good account events !!!!
          this.setWhereClauseParam(0,newAccountId);
          System.out.println(getClass().getName()+".setAccountId before exeqry newAccountId: "+newAccountId);    
          this.executeQuery();
    //      System.out.println(getClass().getName()+".setAccountId after exeqry getRowCount(): "+this.getRowCount());    
          row = this.first();
            if (row != null)
            System.out.println(getClass().getName()+".setAccountId after exeqry+first row.getAttribute(AccountId): "+row.getAttribute("AccountId"));            
            else
            System.out.println(getClass().getName()+".setAccountId after exeqry+first row is null => no rows");                    
          else
          System.out.println(getClass().getName()+".setAccountId NO exeqry this.accountId: "+this.accountId+", newAccountId: "+newAccountId+" current is null? "+(this.getCurrentRow() == null));          
          this.accountId = newAccountId;   
          DEFAULT_VALUES[0] = newAccountId;
          System.out.println(getClass().getName()+".setAccountId this.accountId: "+this.accountId+", newAccountId: "+newAccountId+", DEFAULT_VALUES[0]: "+DEFAULT_VALUES[0]);          
        return row;
    In the AMImpl class I added a service method:
      public Row prepareModelForEventAccountOwnerList(Number accountId)
        EventAccountOwnerListExtVOImpl eventAccountOwnerListExtVOImpl = this.getEventAccountOwnerListExtVO1();
        return eventAccountOwnerListExtVOImpl.setAccountId(accountId);
      }When the user logs in his accountId is retrieved and stored in the HttpSession.
    and the service method is called.
    Ok at this point.
    I have a Page that displays the view.
    In the class AccountEventsAction that extends PagingDataForwardAction I have following initializeModelForPage method.
      protected void initializeModelForPage(DataActionContext ctx)
        System.out.println(getClass().getName()+".initializeModelForPage BEGIN "+System.currentTimeMillis());
        WebAccountAM webAccountAM = (WebAccountAM) this.getApplicationModule(WebConstants.AM_WEBACCOUNT,ctx);
        if (webAccountAM == null)
         // return error
         System.out.println(getClass().getName()+".initializeModelForPage webAccountAM not found.");
        else
          UserContainer userContainer = this.getUserContainer(ctx);
          Row row = webAccountAM.prepareModelForEventAccountOwnerList(userContainer.getAccountId());
          if (row != null)
          System.out.println(getClass().getName()+".initializeModelForPage userContainer.getAccountId(): "+userContainer.getAccountId()+", EventId: "+row.getAttribute("EventId")+", current row key: "+row.getKey());             
          else
          System.out.println(getClass().getName()+".initializeModelForPage userContainer.getAccountId(): "+userContainer.getAccountId()+", First row is null? "+(row == null));     
          super.initializeModelForPage(ctx);
        }To my knowledge because this page is accessible only after login and the VO passivation state (+bind vars ..) is yes it shouldn't be necessary?
    FIRST PROBLEM:(non blocking)
    =============
    I noticed in my trace that the VO current row is null when the service method gets called in the initializeModelForPage binding method?
    So the query gets re-exceuted, is this normal??
    SECOND PROBLEM (blocking)
    ================
    At some point the Web app. the frameworks calls the executeQueryForCollection and an exception is thrown as if the bind variable was lost???
    extract:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation.  Statement: SELECT Wevent.EVENT_ID, ...       
    FROM WEVENT Wevent, WEVENT_DESIGN WeventDesign, ACCOUNT AccountOwner, ACCOUNT AccountPhotoGrapher WHERE (Wevent.EVENT_ID = WeventDesign.EVENT_ID) AND (Wevent.ACCOUNT_ID = AccountOwner.ACCOUNT_ID) AND (Wevent.PHOTOGRAPHER_ACCOUNT_ID = AccountPhotoGrapher.ACCOUNT_ID) AND (Wevent.EVENT_STATUS BETWEEN 30 AND 80) AND (Wevent.ACCOUNT_ID = :0) ORDER BY Wevent.T_MODIFIED
         at oracle.jbo.JboException.<init>(JboException.java:346)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleError(PageLifecycle.java:722)
         at oracle.adf.controller.struts.actions.DataAction.handleError(DataAction.java:257)
         at oracle.adf.controller.struts.actions.DataAction.handleError(DataAction.java:453)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:147)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:223)
         at com.photoswing.webview.actions.BaseDataForwardAction.handleLifecycle(BaseDataForwardAction.java:239)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:155)
         at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:104)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:434)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at com.photoswing.filter.LocaleFilter.doFilter(LocaleFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. 
    06/10/13 22:37:15 java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    06/10/13 22:37:15      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)I hope I didn't miss something and I don't have to review all my bind variables setting methods!
    Your help is required and will be appreciated
    Fred

    More info:
    I added a trace in the executeQueryForCollection method of the VO.
    As I said before the binding var is set on login and in initializeModelForPage
    but when the executeQueryForCollection is called by framework later on in the action cycle, it is called without any parameters => bind variables = numUserParams: 0 ??
    trace extract
    com.photoswing.model.site.EventAccountOwnerListExtVOImpl.executeQueryForCollection this.accountId: null, numUserParams: 0, DEFAULT_VALUES[0]: 0
    I suppose that some code must be added so that my bind variables will be part of the passivation process.
    Can you help me with that?
    Thanks for your time.
    Fred
    PS It's my second day on this problem.

  • Getting error for bind variables

    Hello Experts ;
    SQL> DECLARE
      2  l_eid  number;
      3  l_name  varchar2(30);
      4  BEGIN
      5  l_eid:=1000;
      6  select name into l_name from tab1 where no = l_eid;
      7  l_eid:=9999;
      8  select name into l_name from tab1 where no = l_eid;
      9  l_eid:=299999;
    10  select name into l_name from tab1 where no = l_eid;
    11* END;
    PL/SQL procedure successfully completed.
    when  creating bind variables  i am getting error :
    SQL> variable b1 number;
    SQL> exec :b1 :='select name from tab1 where no = :b1';
    BEGIN :b1 :='select name from tab1 where no = :b1'; END;
    * ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 1

    @ SY
    SolomonYakobson wrote:
    You need to explain "method not workable for me". I have no idea what method you are talking about and what are you trying to achieve.
    SY.
    SQL>DECLARE
        v_value  number;
        v_dispaly varchar2(30);
        BEGIN
       v_value :=100000;
        select name into v_display from tab1 where no = :v_value;
        DBMS_OUTPUT.PUT_LINE(v_display);
        v_value :=20000;
        select name into v_display from tab1 where no = :v_value;
        DBMS_OUTPUT.PUT_LINE(v_display);
         v_value :=250000;
        select name into v_display from tab1 where no = :v_value;
        DBMS_OUTPUT.PUT_LINE(v_display);
      * END;
    RS>/
    PL/SQL procedure successfully completed.
    >>  This is not workable for me ,  Here getting error  >>
    SQL> DECLARE
      2  variable  b1  number;
      3  exec  :b1;
      4  BEGIN
      5  select  name  from  tab1  where no =: b1;
      6* END;
    RS>/
    variable b1 number;
    ERROR at line 2:
    ORA-06550: line 2, column 13:
    PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following:
    := . ( @ % ; not null range default character
    Thanks !

  • How to get the results for given Bind Variable

    Hi
    Can any one help me how to get the result rows from the View Object after executing the view object query by setting bind variable?
    snippet as follows
    viewObject.setNamedWherClauseParams("name","hei");
    viewObject.executeQuery();
    How to get the results from viewObject is my question..?
    Thanks in advance

    Should be something like
    while (vo.hasNext()){
    Row r = vo.next();
    r.getAttribute....
    You might want to read the "most commonly used methods" appendix in the ADF Developer Guide.

  • HOW to get the bind variables list.

    I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
    I need to use DBMS_SQL in order to execute them.
    In theese SQL statements I have some bind variables like :NUMORD. (ex. SELECT 'X' FROM YYYY WHERE FIELD_1 = :NUMORD).
    I don't know "a priori" names and number of such variables.
    Is there any way to have a list of such bind variables ?
    I found DBMS_DESCRIBE but is seems to act only on stored procedures/functions.
    I know I can tray to inspect the code looking for every ':' but a cleaner solution woulf be appreciated.
    Tks
    Tullio

    I don't know "a priori" names and number of such variables.
    Is there any way to have a list of such bind variables ?The names are probably not important, but you can get the count (and other useful information) like this:
    SQL> var cur refcursor
    SQL> declare
        cl clob;
    begin
        dbms_lob.createtemporary (cl, true);
        sys.utl_xml.parsequery (user, 'select e.deptno, :x x from emp e where deptno = :deptno', cl);
        open :cur for select cl cl from dual union all
                      select 'Count binds: ' || xmlquery('count(//BIND_VARIABLE)' passing xmltype(cl) returning content).getclobval() from dual;
        dbms_lob.freetemporary (cl);
    end;
    PL/SQL procedure successfully completed.
    SQL> print cur
    CL                                                                             
    <QUERY>                                                                        
      <SELECT>                                                                     
        <SELECT_LIST>                                                              
          <SELECT_LIST_ITEM>                                                       
            <COLUMN_REF>                                                           
              <SCHEMA>MICHAEL</SCHEMA>                                             
              <TABLE>EMP</TABLE>                                                   
              <TABLE_ALIAS>E</TABLE_ALIAS>                                         
              <COLUMN>DEPTNO</COLUMN>                                              
            </COLUMN_REF>                                                          
          </SELECT_LIST_ITEM>                                                      
          <SELECT_LIST_ITEM>                                                       
            <BIND_VARIABLE>1</BIND_VARIABLE>                                       
            <COLUMN_ALIAS>X</COLUMN_ALIAS>                                         
          </SELECT_LIST_ITEM>                                                      
        </SELECT_LIST>                                                             
      </SELECT>                                                                    
      <FROM>                                                                       
        <FROM_ITEM>                                                                
          <SCHEMA>MICHAEL</SCHEMA>                                                 
          <TABLE>EMP</TABLE>                                                       
          <TABLE_ALIAS>E</TABLE_ALIAS>                                             
        </FROM_ITEM>                                                               
      </FROM>                                                                      
      <WHERE>                                                                      
        <EQ>                                                                       
          <COLUMN_REF>                                                             
            <SCHEMA>MICHAEL</SCHEMA>                                               
            <TABLE>EMP</TABLE>                                                     
            <COLUMN>DEPTNO</COLUMN>                                                
          </COLUMN_REF>                                                            
          <BIND_VARIABLE>2</BIND_VARIABLE>                                         
        </EQ>                                                                      
      </WHERE>                                                                     
    </QUERY>                                                                       
    Count binds: 2                                                                 
    2 rows selected.

Maybe you are looking for

  • Can i create an apple id without billing information?

    I have just created a new apple ID and i dont have a credit card or gift card and it requires one. Can i somehow skip this part?

  • Can I open my final cut express projects in final cut pro X?

    I need to get footage out of some of my final cut express projects and put them in final cut pro X, which I am now using. How do I do that?

  • Using indd CS4 for email blasts?

    Happy Holidays everyone.  Instead of using 'contant contact' or other such email blast software with templates, what I typically do is design an original email blast in InDesign, and then send it as a pdf to a company who switches it (somehow) into h

  • How to Display last Login Details in MasterPage

    Hi, we have one requirement,i.e.When any user logged into the site, we need to display last login time for that user. We are getting last logged user date and time based on user id and updating that value into the list column(like this 4/3/2015 8:38:

  • Migration to new GL - blueprint

    Dear all! Does anyone have some kind of template for the blueprint for migration to new GL or knows where I could find something like that? I have to write it and I don't even know from where to start. Please help!