Problem in fetching row code...

Hi there,
I have a bit of a problem setting up automatic row processing. The Apex processing is causing an error, but I'm not sure what PL/SQL code is being run (obviously, I don't have access to the Apex code) and all I get is the error following:
0.03: Processing point: AFTER_HEADER
0.03: ...Process "Fetch Row from VMS2_VU_VEHICLE_DETAILS": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:VMS2_VU_VEHICLE_DETAILS:P21_ID:ID
0.05: Show ERROR page...
0.05: Performing rollback...
0.05: Processing point: AFTER_ERROR_HEADER
and then the following exception report on the page:
ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
Can anyone tell me how I can diagnose the problem?
please ,
Thanks in Advance
Ahmed ,

Go to apex.oracle.com, use the Request a Workspace link, submit a request, wait for approval, then import your app into your workspace.
Create a table in your workspace schema using the SQL Workshop so that you can get the same error message when you run that form page that's giving you trouble.
When you get to that point, just tell me your workspace name and application ID.
Scott

Similar Messages

  • Problem in fetching the code for the line item

    Hi,
    I am working on a report in which to display the values corresponding to the line item of a PO.
    For, ex, if there are 3 line items 10,140,150 and their condition values such zing,zgrd,zbrd are the condition types consist of different values depending on the line item i.e. 10,140,150.
    My problem is when i execute the code the data of 1st line item is correctly fetched but the rest 2 line item data is pasted as it is. only the main pricre changes and the code for zing,zbrd,zgrd remains same as it is in the first line item 10.
    plzz proivde me guide lines how to solve this problem.
    Here's d code:-
    DATA : vspl LIKE konv-kbetr.
    DATA : vspl1 LIKE konv-kbetr.
    DATA : vkwert LIKE konv-kwert.
    DATA: VSPL2 LIKE KONV-kbetr.    "ZING COST
    DATA: VSPL3 LIKE KONV-kbetr.    "ZGRD COST
    DATA: VSPL4 LIKE KONV-kbetr.    "ZBDL COST
    LOOP AT item.
        SELECT kbetr FROM konv INTO item-rate  WHERE knumv = header-knumv AND kposn = item-ebelp
         AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
          MODIFY item.
       ENDSELECT.
      ENDLOOP.
      LOOP AT item.
        SELECT kwert FROM konv INTO vkwert  WHERE knumv = header-knumv AND kposn = item-ebelp
        AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
        ENDSELECT.
      ENDLOOP.
    CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
      LOOP AT item.
        SELECT kbetr FROM konv INTO vspl  WHERE knumv = header-knumv AND kposn = item-ebelp  
       AND  kschl = 'ZCOM'.
        ENDSELECT.
        SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
        AND  kschl = 'ZBR1'.
        ENDSELECT.
    *******************Begin - new code added on 14.01.2009******************
        SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
        AND  kschl = 'ZING'.
        ENDSELECT.
       SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
       AND  kschl = 'ZGRD'.
        ENDSELECT.
       SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
       AND  kschl = 'ZBRL'.
       ENDSELECT.
    *******************End - new code added on 14.01.2009******************
      ENDLOOP.
      LOOP AT item.
        item-rate  = item-rate + vspl + vspl1.
    *******************Begin - new code added on 14.01.2009******************
        item-rate1 = item-rate1 + vspl2.
        item-rate2 = item-rate2 + vspl3.
        item-rate3 = item-rate3 + vspl4.
    ********************End - new code added on 14.01.2009*******************
        MODIFY item INDEX sy-tabix TRANSPORTING rate.
    *******************Begin -11`` new code added on 14.01.2009******************
        MODIFY item INDEX sy-tabix TRANSPORTING rate1.
        MODIFY item INDEX sy-tabix TRANSPORTING rate2.
        MODIFY item INDEX sy-tabix TRANSPORTING rate3.
    *********************End - new code added on 14.01.2009******************
      ENDLOOP.
    PLZ PROIVDE ME GUIDLINES HOW TO SOLVE THIS PROBLEM .
    Edited by: ricx .s on Jan 19, 2009 10:16 AM
    Edited by: Vijay Babu Dudla on Jan 19, 2009 5:22 AM

    Hello,
    Why are you looping at the same internal table so many times, you could probably perform everything within one loop instead.
    DATA : vspl LIKE konv-kbetr.
    DATA : vspl1 LIKE konv-kbetr.
    DATA : vkwert LIKE konv-kwert.
    DATA: VSPL2 LIKE KONV-kbetr. "ZING COST
    DATA: VSPL3 LIKE KONV-kbetr. "ZGRD COST
    DATA: VSPL4 LIKE KONV-kbetr. "ZBDL COST
    field-symbols <fs>.
    LOOP AT item assigning <fs>.
    SELECT kbetr FROM konv INTO <fs>-rate WHERE knumv = header-knumv AND kposn = item-ebelp
    AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
    MODIFY item.
    ENDSELECT.
    SELECT kwert FROM konv INTO vkwert WHERE knumv = header-knumv AND kposn = item-ebelp
    AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
    ENDSELECT.
    ENDLOOP.
    CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
    SELECT kbetr FROM konv INTO vspl WHERE knumv = header-knumv AND kposn = item-ebelp
    AND kschl = 'ZCOM'.
    ENDSELECT.
    SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND kschl = 'ZBR1'.
    ENDSELECT.
    *******************Begin - new code added on 14.01.2009******************
    SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND kschl = 'ZING'.
    ENDSELECT.
    SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND kschl = 'ZGRD'.
    ENDSELECT.
    SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND kschl = 'ZBRL'.
    ENDSELECT.
    *******************End - new code added on 14.01.2009******************
    <fs>-rate = <fs>-rate + vspl + vspl1.
    *******************Begin - new code added on 14.01.2009******************
    <fs>-rate1 = item-rate1 + vspl2.
    <fs>-rate2 = item-rate2 + vspl3.
    <fs>-rate3 = item-rate3 + vspl4.
    ENDLOOP.
    Also, use field-symbols and use loop at itab assigning addition so that you can directly change the contents of the table without using modify statment.
    regards,
    Advait

  • Problem in fetching rows

    Hi
    I have a table which contains one foreign key(say function_id) and I made a composite primary key in my table which is the combination of two fields (say function_id,groups)..so I dont use any automatic generated id in this table..I did not have any problem in inserting the details...But I got a problem in updating the details..i.e I want to fetch the details(group,function_id)...the problem is that I got 'no data found error' while fetching...can anyone say what condition have I to give to fetch the details....
    Thanks in advance
    Fazila

    Hi
    I have a table which contains one foreign key(say function_id) and I made a composite primary key in my table which is the combination of two fields (say function_id,groups)..so I dont use any automatic generated id in this table..I did not have any problem in inserting the details...But I got a problem in updating the details..i.e I want to fetch the details(group,function_id)...the problem is that I got 'no data found error' while fetching...can anyone say what condition have I to give to fetch the details....
    Thanks in advance
    Fazila

  • Problems deleting current row

    Hello,
    I have got the following problem. I have got a table with data from my database. And a dataprovider to fetch the data from my rowset. I have got a button in each row of this table where i can get details or delete the corresponding row.
    But when i click delete he wont delete the row correct. After a while i realised that the always fetch the same row. I dont understand why because i took the same code as it was used in the tutorial. For control i made a variable to remember the id of the fetched row but it wont change after the first "delete". Can somebody tell me why he wont change the value?
    public String l�schen_action() {
    try {
    RowKey rowKey = tableRowGroup1.getRowKey();
    int id = getSessionBean1().getMaxappid().parseInt(applikationDataProvider.getValue("APPID", rowKey).toString(), 10);
    getSessionBean1().setTemp(id);
    if(rowKey != null && applikationDataProvider.canRemoveRow(rowKey)){
    applikationDataProvider.removeRow(rowKey);
    applikationDataProvider.commitChanges();
    applikationDataProvider.refresh();
    } catch (Exception e) {
    log("Fehler beim L\366schen des Eintrags", e);
    error("Exception deleting row: " + e);
    } // end try catch
    return null;
    Thanks in advance for help
    Acinonyx

    Try this and see if that helps
    Rowkey currentRowKey = (RowKey) getBean("currentRow");
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • Problem while Fetching BSAD

    Hi to all ,
    I' ve problem while fetching bsad for a report , in t-code se30 i've seen that it takes %89,1 performance of overall.
    SELECT belnr buzei dmbtr  blart budat augdt augbl sgtxt
       into table odemelerg
              FROM bsad
              WHERE bukrs EQ bukrs
                AND kunnr EQ kunnr
                AND ( umsks EQ space OR umsks IS NULL )
                AND ( umskz EQ space OR umskz IS NULL )
                AND augbl EQ i_augbl
                AND augdt GE i_budat
                AND gjahr EQ gjahr
                AND belnr NE i_belnr
                AND bsadbelnr NE bsadaugbl
                AND ( blart EQ blart_bt OR blart EQ blart_hf
                      OR blart EQ blart_mi ).
    here : blart_bt is declared as a constant type and its value is 'BT'. such as blart_hf, blart_mi
    How can I make this Select query working in a better performance
    Kind regards,
    Caglar

    Hi
    If you know the bill number:
    -1) Search FI document:
    Get header data
    select * from bkpf where AWTYP = 'VBRK'
                         and AWKEY = BILL NUMBER.
    EXIT.
    ENDSELECT.
    Get items data
    SELECT * FROM BSEG INTO TABLE T_BSEG
                           WHERE BUKRS = BKPF-BUKRS
                             AND BELNR = BKPF-BELNR
                             AND GJAHR = BKPF-GJAHR
                             AND KOART = 'D'.
    Payment:
    LOOP AT T_BSEG WHERE AUGDT <> '00000000'.
    IF T_BSEG-AUGBL <> _BKPF-BELNR
        T_BSEG-AUGDT <> _BKPF-BUDAT.
    SELECT * FROM BKPF INTO _BKPF
                        WHERE BUKRS = T_BSEG-BUKRS
                          AND BELNR = T_BSEG-AUGBL
                          AND BUDAT = T_BSEG-AUGDT.
       EXIT.
    ENDSELECT.
    SELECT * FROM BSEG APPENDING TABLE T_PAYMENT
                           WHERE BUKRS = _BKPF-BUKRS
                             AND BELNR = _BKPF-BELNR
                             AND GJAHR = _BKPF-GJAHR
                             AND KOART = 'D'.
    ENDIF.
    ENDLOOP.
    Partial payment
    SELECT * FROM BSAD INTO TABLE WHERE BUKRS = BKPF-BUKRS
                                    AND KUNNR = T_BSEG-KUNNR
                                    AND REBZG = BKPF-BELNR
                                    AND REBZJ = BKPF-GJAHR.
    Max

  • PROBLEM WITH NEW ROW  --- PLEASE HELP

    Hello,
    I've had it with the framework. It's been 20 hours and counting that I am trying to insert/validate a new record.
    Things just don't work as advertised.
    Here's the situation:
    I have an entity object with various validation rules in the validate() method.
    Then I have a simple JSP page to insert new records.
    At submit of button, I follow the framework's default
    create new row and fill it up, with the difference
    that i need to validate the row as soon as I fill it up
    with data from the http request:
    <jbo:OnEvent name="Create">
    <jbo:Row id="newrow" datasource="ds" action="CreateInRange" >
    <% try { %>
    <jbo:SetAttribute dataitem="*" />
    <%
    newrow.validate(); //******* NOTICE HERE THAT I VALIDATE
    } catch (JboException ex) {
    newrow.remove();
    throw ex;
    } %>
    </jbo:Row>
    </jbo:OnEvent>
    Unexpected behavior 1: If the validation fails,
    newrow DOES NOT GET REMOVED!!!! I know this
    since when I view data thru a data table component,
    the row is there WITH THE ERROR INFORMATION set!!.
    If I do a commit transaction, then the erroneous information ENDS UP IN THE DATABASE!!!!!
    Unexpected behavior 2: If I do a rollback, every
    call to subsequent pages results in a jsp error:
    java.lang.ClassCastException: oracle.jbo.html.jsp.datatags.OnEventTag
    PLEASE HELP.
    Chris Lambrou

    I have (hopefully) found a solution to my part of this problem. I was getting the ClassCastExceptions on any page with a <jbo:row> tag after doing a failed DML action. I have tested this with the delete event. (btw, I am using jdev9.0.3.3 w/ BC4J/JSP) Before what I was doing was this:
    <% try { %>
    <jbo:Row id="delrow" datasource="ds" rowkeyparam="jboRowKey" action="Delete" />
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    If I removed the try/catch block everything worked fine. Unfortunatlely, I need to try/catch block here. To work around the problem I changed the code to this:
    <% Row rowDelete = ds.getRowFromKey(params.getParameter("jboRowKey")); %>
    <% try { %>
    <%
    rowDelete.remove();
    %>
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    The second bit of code does the same thing (but it doesn't use a bean like I think <jbo:Row> does) and it doesn't cause the ClassCastError on subsequent errors.
    I really hope this helps someone else because it took me forever to get a workaround!
    ~Rob Lundeen

  • Using where clause in Fetch Row from table

    Hello,
    I call Page2 from Page1, I pass PK1 to Page2.
    In the section Fetch Row from Table2, I write a Where clause ( FK2 = : PK1). I have data in Table2 with FK = PK1, but I cant view the data in Page2.
    Where is the error?
    Thanks for help.

    please recreate the problem in apex.oracle.com
    please create a developer account so that you don't give your email to all the spam-bots.
    MK

  • Problem in deleting Rows of JTable after sorting it

    Hi all,
    I'm getting problems in Removing Row(s) after sorting a JTable.
    Please find the code snippets at this URL. Thanks for your time...
    http://forum.java.sun.com/thread.jsp?forum=31&thread=459736&start=15&range=15&hilite=false&q=

    Hi Abhijeet,
    I tried it the way you said using
         wdContext.nodeBirhtday_List().nodeItab().moveFirst();
         //     loop backwards to avoid index troubles
         for (int i = n - 1; i >= 0; --i)
              current_date  = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getDate();
              current_month = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getMonth();
              if (( current_date != date_today ) && ( current_month != month_today ))
                   wdContext.nodeBirhtday_List().nodeItab().removeElement(wdContext.nodeBirhtday_List().nodeItab().
                                  getElementAt(i));                
              wdContext.nodeBirhtday_List().nodeItab().moveNext();     
    It adds records...
    According to Valerys Solution, the IPrivate<CustomController> doesnt show me the required nodes. and gives me 'Unable to resolve' error.
    Can you please suggest where I am going wrong
    Regards
    Abdullah

  • Unable to fetch row opening form on table

    Hi all,
    i have a page with 2 regions, a form on table for DML and a report region that lists the same table.
    I am trying to create records in the form and then recall them by report row link for changes.
    I cant test if all that stuff can work because i when i run the page after first time an Unable to fetch row error is raised.
    After that i have to logout and login and run the page again.
    I do my best to explain the problem but feel free to ask for more.
    Any kind of help or suggestions are welcome.
    Thanks, Alex

    Hi,
    yes this is the problem.
    When i run the page the first time it seem to work fine but after editing, just edit page and run again , the error is raised and the only way out is to logout apex.
    My expectation was that if i run the page setting the rowid item , that is the pk of the tabular form, the region appear with setting for insert.
    Greets.

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Fetch Row process error in form called from report

    I have an interactive report that calls a form (when user hits the edit link on a row). The form is using a fetch row process (Automatic Row Processing). The problem I have is if a user tries to hit the edit link on a row that was already deleted, I get the 'No Data Found' error. I got around it by adding a condition (exists) to the fetch row process, but that just retirns a blank recor din the form. I wanted to either make a nice error (with a validation) etc. Anybody run into this?

    Bob,
    The easiest thing to do would be to have the page with the interactive report submit the page and you could use a validation on that page to run the check before redirecting the user to the form with a branch. To do this, however, as the interactive report only has "link" options, you'll need to use a little javascript in the query...
    Example:
    SELECT id,
    '&lt;span onclick=&quot;doSubmit(''' || id || ''')&quot;&gt;Edit&lt;/span&gt;' AS edit
    FROM TABLERegards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    Edited by: dmcghan on Dec 18, 2008 3:02 PM

  • How to fetch rows from PL/SQL table(Collections)

    Hi,
    I retrived rows from the table and stored in to table type.
    Now I want fetch these rows and display on the screen. Pls guide me.
    following code is my code:
    DECLARE
    type t1 is table of emp%rowtype index by binary_integer;
    var1 t1;
    v_counter number:=0;
    BEGIN
    select * bulk collect into var1 from emp;
    for vr in var1.first..var1.last
    loop
    dbms_output.put_line(var1(1)); --Got an Error Here. Acually I don't Know how to  fetch.
    update dept set deptno=var1.deptno --Here also Error occured.
    end loop;
    END;

    Fetching rows to display them is a task for the client tool. You need to define a ref cursor therefore.
    If you just want to play around, here we go
    SQL> DECLARE
      2    type t1 is table of emp%rowtype index by binary_integer;
      3    var1 t1;
      4    v_counter number:=0;
      5  BEGIN
      6    select * bulk collect into var1 from emp;
      7    for vr in 1..var1.count loop
      8      dbms_output.put_line(var1(vr).ename);
      9      update dept set deptno=var1.deptno Here also Error occured.
    10    end loop;
    11  END;
    12  /
    SCOTT
    ADAMS
    PL/SQL procedure successfully completed.
    SQL>

  • Problem with front row, please help!

    I got a year old MBP 15" which I updated to leopard, and it works generally fine, except for the fact that when using front row and leaving it playing music for about 5 minutes idle, it freezes, goes to blank screen, but still plays the playlist it was set on, but when I use the remote control, or press keys, it keeps frozen, the only way to quit is to force power off.
    Please help me, as I really like Front Row and my MBP is my hub for playing music in reunions.
    Thanks in advance

    I have (hopefully) found a solution to my part of this problem. I was getting the ClassCastExceptions on any page with a <jbo:row> tag after doing a failed DML action. I have tested this with the delete event. (btw, I am using jdev9.0.3.3 w/ BC4J/JSP) Before what I was doing was this:
    <% try { %>
    <jbo:Row id="delrow" datasource="ds" rowkeyparam="jboRowKey" action="Delete" />
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    If I removed the try/catch block everything worked fine. Unfortunatlely, I need to try/catch block here. To work around the problem I changed the code to this:
    <% Row rowDelete = ds.getRowFromKey(params.getParameter("jboRowKey")); %>
    <% try { %>
    <%
    rowDelete.remove();
    %>
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    The second bit of code does the same thing (but it doesn't use a bean like I think <jbo:Row> does) and it doesn't cause the ClassCastError on subsequent errors.
    I really hope this helps someone else because it took me forever to get a workaround!
    ~Rob Lundeen

  • netui-data:pager action to dynamically fetch rows

    Hi,
    How can I configure a data grid pager to dynamically fetch new rows when a user swap pages through the pager?
    I know I can fetch all my rows to a collection / array before rendering the datagrid and set the pager to iterate over it like this:
    [Controller]
    private List<Ride> rides;
    public List<Ride> getRides() {
         return rides;
    [Action]
    rides = rideDBControl.getAllRides(); // huge amount of data
    return forward;
    [JSP]
         <div style="border-width:2px;"><netui-data:dataGrid name="currentRidesGrid" dataSource="pageFlow.rides">
              <netui-data:configurePager pagerFormat="prevNext" pageSize="${pageSize}" />
              <netui-data:header>
                   <netui-data:headerCell headerText="Name" />
                   <netui-data:headerCell headerText="Description" />
              </netui-data:header>
              <netui-data:rows>
                   <netui-data:spanCell value="${container.item.name}" style="background-color: #f0f0f0;font-size:14pt;">
                   </netui-data:spanCell>
                   <netui-data:spanCell value="${container.item.description}">
                   </netui-data:spanCell>
              </netui-data:rows>
         </netui-data:dataGrid></div>
    But how can I make the pager call a method to update the contents of the collection "rides" according to the current selected page and page size? And how can I obtain the current page and page size inside that method?
    I want to paginate queries that may return a huge amount of data (1m + rows), so, fetching all rows at once is impracticable. What I want to do is propagate the current page and page size from the pager to a method that will update the current collection according to a query such as:
    Select X, Y, Z
    From Table
    Where ...
    And ROWNUM BETWEEN page * pageSize AND (page + 1) * pageSize
    Can anyone help a noob?

    For further reference I've found the answer by myself.
    To dynamically fetch rows you need to modify the <netui-data:configurePager> tag and include both a pageAction and partialDataSet attributes, e.g.:
    <netui-data:configurePager pagerFormat="prevNext" pageSize="${pageSize}" pageAction="pagination" partialDataSet="true" />
    Within the pagination action you can obtain the current row and page size from a PagerModel object. You can then update the dataSource (just remember to call the setDataSetSize providing the length of the full dataset so that the pager displays the correct amount of pages), e.g.:
    @Jpf.Action(forwards = { @Jpf.Forward(name = "success", navigateTo = Jpf.NavigateTo.currentPage) })
         public Forward pagination() {
              DataGridStateFactory dataGridStateFactory = DataGridStateFactory
                        .getInstance(getRequest());
    // Gets the pagerModel object for the grid
              PagerModel pagerModel = dataGridStateFactory.getDataGridState(
                        "currentRidesGrid").getPagerModel();
    // => Code to get the entire dataSource size <=
              pagerModel.setDataSetSize(dataSourceSize);
              // Obtain the first row and page size from the model
              int firstRow = pagerModel.getRow();
              int pageSize = pagerModel.getPageSize();
              // => Code to fetch the rows to be displayed <=
              rides = pageRides;
              Forward forward = new Forward("success");
              return forward;
    I hope this helps.
    Cheers

  • Problems with multiple row operations in a dataTable

    Dear fellows,
    I have a strange problem, i want to do multiple row deletion in a dataTable. Can any one tell me a better way to do it. Because the way i am doing it, it is causing me strange problems. In some places it start working and in some it dont.
    The way i am doing it, it has the following code:
    <h:form>
    <h:dataTable id="list" value="#{availableRoomsList}"  var="RoomTypes" >
    <h:column>
         <f:facet name="header">
                 <h:outputText value="Select"/>
           </f:facet>
                 <h:selectBooleanCheckbox value="#{roomSelection[RoomTypes]}" >
                   </h:selectBooleanCheckbox>
    </h:column>
    <h:column>
         <f:facet name="header">
              <h:outputText value="Available Date"/>
         </f:facet>
         <h:outputText value="#{RoomTypes.availableDate}"/>
    </h:column>
    <h:column>
         <f:facet name="header">
              <h:outputText value="Available Rooms"/>
         </f:facet>
         <h:outputText value="#{RoomTypes.noOfRooms}"/>
    </h:column>
    </h:dataTable>
    <h:commandButton value="delete Selected Rooms" action="#{RoomResvAction.deleteRooms}" />
    </h:form>Now the back end code that i am using is as follows:
         private List<HotelRoomTypes> availableRoomsList;
          Map<HotelRoomTypes, Boolean> roomSelection = new HashMap<HotelRoomTypes, Boolean>();
             public String deleteRoom(){
                  System.out.println("In the delete selection method aad.");
                  try{
                       for (HotelRoomTypes item: availableRoomsList) {
                          Boolean selected = roomSelection.get(item);
                          if (selected!=null && selected) {
                               roomSelection.put(item, false);
                               //deleteRoom(item);
                  }catch(Exception e){
                       //e.printStackTrace();
                  return null;
             }The problem with the JSF code is when i click the command button it do not calls the associated action method with it. i dont know what is the problem with the code.
    And as far as the backend code is concern it should work fine.
    can anybody help me on this matter.

    thanks BalusC ,
    I will see this example and let you know, thanx for the help.
    but also please try and see my code and tell me what is wrong in it. because at some places it works and at some it simply dont . dont know why?
    well once again thanx for the help

Maybe you are looking for