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

Similar Messages

  • 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

  • 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

  • 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.

  • 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,
    '<span onclick="doSubmit(''' || id || ''')">Edit</span>' AS edit
    FROM TABLERegards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    Edited by: dmcghan on Dec 18, 2008 3:02 PM

  • 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

  • OnError in form: Error Unable to fetch row

    Hello,
    I'm trying to create such functionality, that in report "edit" link leads to form on another table. Everything is ok with rows, that exist in that table (i can edit them in form). But I want, that if row does not exist - the form should open the "Create record" window.
    Now i get an error:
    ORA-01403: no data found
    Error Unable to fetch row.
    Maybe some computation needs to be done for primary key?
    Thanks.
    Edited by: user11022609 on 2009.4.14 03.38

    I requested for workspace in apex.oracle.com, but i solved the problem sooner. I created one more column ir report (using the unique column left join), which was the primary key of the other table and included it into EDIT link.
    Edited by: user11022609 on 2009.4.14 06.12

  • 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

  • I have Problem in fetching data from CONTROL BLOCK

    Sir,
    I am facing problem in fetching data from control block.
    Asif.

    is your control-block a filter-block for the detail-block?
    Do you want to see only the detail-data of the user-id you have displayed in the master?

  • 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

  • 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.

  • 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 when fetching a VO

    Hi,
    I am facing a problem when fetching a VO. Actually i am having a field which is of type MessageTextInput. This field has a initial value set to 1 which is taken from the database. In the page i change the value to that field to 5(say). But when i am fetching the vo which this field is resided, I am getting value 1 only not 5 which i changed. I know it will take the value from database itself, but i want to fetch 5. How is this possible. Please any one help me out in this issue.
    Thanks in Advance.

    are you taking the instance of the OAMesaageTextInputBean in ur CO.
    You need to take the instance and then get the entered value. Only then you will be able to see the updated value (5)
    Let me know for any other help and if it doesn't resolve ur problem, Please provide some more information on it.
    Thanks
    Anoop

  • 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

  • How to fetch rows from a table like search engines do?

    Is it possible to fetch rows from a table like Google does? I want to fetch row number 20-40 after the select has ordered the rows.
    Pseudo code: select * from log where rownum > 20 and rownum < 40 order by date;
    Rownum doesn't work with ordering so I tried:
    select * from log where (select * from log order by date) and rownum <20;
    But that still doesn't do what I want. I get the "top 20" rows but I can't get rows 20-40.
    My real table has 70000 rows and I want to select 69000-70000 so I really need a SQL do fetch only the rows I need.
    Any help would be very appreciated!
    Best regards,
    Christer Nordvik

    SELECT alias_for_rownum, column_names
            FROM   (SELECT ROWNUM AS alias_for_rownum, column_names
                    FROM   (SELECT   column_names
                            FROM     table_name
                            ORDER BY columns_to_order_by)
                    WHERE  ROWNUM <= last_row_you_want)
            WHERE  alias_for_rownum >= first_row_you_want
    Example:
    -- (This example uses the Oracle dept demo table.
    SET AUTOTRACE ON EXPLAIN
    SELECT rn, deptno, dname, loc
            FROM   (SELECT ROWNUM AS rn, deptno, dname, loc
                    FROM   (SELECT   deptno, dname, loc
                            FROM     dept
                            ORDER BY deptno)
                    WHERE  ROWNUM <= 3)
            WHERE  rn >= 2
                    RN     DEPTNO DNAME          LOC
                     2         20 RESEARCH       DALLAS
                     3         30 SALES          CHICAGO

Maybe you are looking for