too many lines found

I have two data blocks, a data block joins two tables and second datablock is based on a table.
first DataBlock has all the fields with a ratio of 1:1 with Packing_id and second details of data block has several lines
for each Packing_id I wrote 2 procs for 2 rematch are called respective after trigger query.

My problem is when I am in form gives the Error Message ("too many lines found_orders_begin'");

Here are my codes.

PROCEDURE post_query IS
CURSOR mast_cur IS
SELECT pa.ship_to_last_name,
PA.ship_to_first_name,
PA.ship_to_address1,
PA.ship_to_address2,
PA.ship_to_city,
p.packing_id,
OF pa, packing p packing_attributes
WHERE the p.packing_id; = pa.packing_id
AND p.packing_id; =: PACKING_JOINED. PACKING_ID;

BEGIN
Message ("too many lines found_orders_begin'");
OPEN mast_cur.
loop
EXTRACTION mast_cur to: PACKING_JOINED. SHIP_TO_LAST_NAME,
: PACKING_JOINED. SHIP_TO_FIRST_NAME,
: PACKING_JOINED. SHIP_TO_ADDRESS1,
: PACKING_JOINED. SHIP_TO_ADDRESS2,
: PACKING_JOINED. SHIP_TO_CITY,
: PACKING_JOINED. PACKING_ID,
end loop;
CLOSE Mast_cur;

EXCEPTION
WHEN too_many_rows THEN
Message ("too many lines found '");
WHEN no_data_found THEN
Message ("no data has been found it is '");
WHILE OTHERS THEN
Message ("do something else'");

END post_query;
***********************************************************************************
Detail of proc

PROCEDURE post_query IS
CURSOR det_cur IS
SELECT pd.quantity,
PD.stock_number,
OF packing_details pd, packing p
WHERE the p.packing_id; = pd.packing_id
AND pd.packing_id =: PACKING_JOINED. PACKING_ID;
BEGIN
Message ("too many lines found_pack_begin'");
OPEN det_cur.
Look FOR det_cur IN
: DETAILS. QUANTITY,
: DETAILS. STOCK_NUMBER,
CLOSE Det_cur;

EXCEPTION
WHEN too_many_rows THEN
Message ("too many lines found '");
WHEN no_data_found THEN
Message ("no data has been found it is '");
WHILE OTHERS THEN
Message ("do something else'");

END post_query;


Thanks in advance for your help.

Sandy

If it is an element of data, why you change the database value in POST-QUERY-trigger with your select? At that time you assign a new value to a database element. It's like changed recording (if editing is allowed, otherwise it will trigger an error)

Tags: Oracle Development

Similar Questions

  • too many lines return to query?

    I am trying to write a query to extract data from two different tables. There are 444 records in the table p and 650 records in table T, but when I run my application I get over 10,000 + records? When I look at the results, it seems that it applies several dates per person when there is only 1 deadline? and showing multiple languageid when only 1 language?

    SELECT P.LASTNAME, P.FIRSTNAME, T.LANGUAGEID, T.TEST_TYPE, T.END_DATE, T.SCORE1, T.SCORE2
    OF PS_TEST_SCORES T, PS_PERSONNEL P
    WHERE T.SCORE1 > = '2'
    AND T.SCORE2 > = '2'
    AND T.END_DATE between to_date (1 January 2009 00:00:00 ', "hh24:mi:ss of mon-dd-yyyy")
    and to_date (28 January 2011 00:00:00 ', "hh24:mi:ss of mon-dd-yyyy")
    ORDER BY P.LASTNAME;

    example of result would be

    test_type German john Jones 24 - dec-09
    German john Jones January 22 09
    john Jones 1 February 10 German
    John Spanish Jones August 5, 10

    Once you the alias of a table in the FROM clause, you must use the alias everywhere.

    SELECT DISTINCT P.SSN,P.LASTNAME, P.FIRSTNAME, T.LANGUAGEID, T.TEST_TYPE, T.END_DATE, T.SCORE1, T.SCORE2
      FROM PS_TEST_SCORES T,
          PS_PERSONNEL P
     WHERE T.SSN=P.SSN
       AND T.SCORE1 >='2'
       AND T.SCORE2 >='2'
       AND T.END_DATE between to_date( '01-jan-2009 00:00:00', 'dd-mon-yyyy hh24:mi:ss' )
                          and to_date( '28-jan-2011 00:00:00', 'dd-mon-yyyy hh24:mi:ss' )
     ORDER BY P.LASTNAME; 
    

    As you add a join condition, you are sure you really need the SEPARATE? Many new developers throw the SEPARATE on their queries into thinking that it is necessary because they missed a join condition. Unless you know that he's supposed be returned without the SEPARATE, leaving the SEPARATE in just the duplicate lines made Oracle work more hard.

    Justin

  • Too many lines 'recipient' when I reply to a message

    Since I updated to 31.0 Thunderbird version, whenever I hit him "reply" to an e-mail message rather than just get the two lines from and to, I get two additional blank lines before the "Subject" line I have to shrink the header to get rid of these extra lines. Not a major problem, but starts to annoy me.

    This did, in fact, solve my problem. I want to just emphasize that it takes effect as soon as you exit Thunderbird and then re - start.

    Thank you very much!

  • LiveCycle dynamic form adds too many lines and does not save properly

    Hello

    I'm fairly new to LiveCycle Designer.  I designed a few forms that behave in the same way, and I'm curious to know if someone would mind helping me find my mistake.

    I have a table that I need to be able to add and subtract lines.  If I add a line and fill in the information, it seems good.  If I save the form and re-open information disappeared and there are several added lines which are empty.  How can I fix?

    Document link: file - sharing Acrobat.com

    Thank you very much

    Loren

    Hey Loren,

    It's very strange, and I would say a bug in the binding process.  It seems that from Table2 Row1 elements can be picked up as part of the binding of the nested table, table 3, which has a line called Row1.

    I changed the Row1 under Table3 to SubRow1 and it seems to work fine.

    I don't know how you want the buttons Add/Remove to work, but "this.parent.index" you will get the index of Cell1 (which will always be 1), you can "this.parent.parent.index".

    Concerning

    Bruce

  • "Too many IDATs found" error during rendering?

    Someone has already asked about this, but this is the second time it happens to me, so perhaps this is due to the memory cache?
    I made a Png 4K sequence with the glow effect based on a mask simple sphere, it worked fine when I was create and animate, but after the middle to make it (like, 1226 4000 pictures, 60 frames per second) he couldn't, even before that, he failed to 1226 images too, I deleted the Cache, handed the computer and tried again After I couldn't restart the make because I had something else to do so I wasn't aware, but still, if I try to continue to frame 1226, the error keeps appearing...

    ERROR_.png

    What can I do this? I'm really worried since this is a mistake on the same thought rendering animation and layers are addressing the composition...

    IDATs are tables of compression of PNG format, so that's something. Try a different image format. If not do the usuaul - check, if you are not running run out of disk space, check your color settings and so on.

    Mylenium

  • Connect By with too many lines

    Hello
    I have a table of contracts. Each may have different payment intervals: M quarterly q, Y annually, monthly or one-time payment of E.
    Now I want a select that displays all dates of start to maturity (duration) when the collection of accounts outstanding takes place.
    DROP TABLE contract;
    CREATE TABLE contract (
         nr             NUMBER (5)
        ,dat_begin      DATE
        ,invoiced       VARCHAR(1)
        ,duration       NUMBER(5)
        );
    INSERT INTO contract (nr,dat_begin,invoiced,duration)
        VALUES (345,TO_DATE('01.01.2008','dd.mm.yyyy'),'M',1);
    --INSERT INTO contract (nr,dat_begin,invoiced,duration)
    --    VALUES (456,TO_DATE('01.01.2008','dd.mm.yyyy'),'Q',2);
    INSERT INTO contract (nr,dat_begin,invoiced,duration)
        VALUES (567,TO_DATE('01.01.2007','dd.mm.yyyy'),'Y',1);
    --INSERT INTO contract (nr,dat_begin,invoiced,duration)
    --    VALUES (678,TO_DATE('01.01.2008','dd.mm.yyyy'),'E',2);
    
    WITH
    first_month AS(
        SELECT  TRUNC(dat_begin,'MM') AS first_date
               ,nr
               ,DECODE (invoiced
                        ,'M',1
                        ,'Q',3
                        ,'Y',12
                        ,'E',1000
                        ) AS intervall
               ,duration
        FROM    contract
        )
    SELECT  ADD_MONTHS(first_date,(LEVEL - 1) * intervall)  AS all_dates
           ,nr
           ,duration
           ,intervall
           ,CONNECT_BY_ROOT nr
    FROM    first_month
    CONNECT BY  LEVEL <= duration * 12 / intervall
    Now, I expect to get 12 dates for contract 345 and the other for 567. But...
    ALL_DATE   NR DURATION INTERVALL LEVEL CONNECT_BY_ROOTNR
    -------- ---- --------  -------- ----- -----------------
    01.01.08  345        1         1     1               345
    01.02.08  345        1         1     2               345
    01.03.08  345        1         1     3               345
    01.04.08  345        1         1     4               345
    01.05.08  345        1         1     5               345
    01.06.08  345        1         1     6               345
    01.07.08  345        1         1     7               345
    01.08.08  345        1         1     8               345
    01.09.08  345        1         1     9               345
    01.10.08  345        1         1    10               345
    01.11.08  345        1         1    11               345
    01.12.08  345        1         1    12               345
    01.01.07  567        1        12     1               567
    01.02.08  345        1         1     2               567
    01.03.08  345        1         1     3               567
    01.04.08  345        1         1     4               567
    01.05.08  345        1         1     5               567
    01.06.08  345        1         1     6               567
    01.07.08  345        1         1     7               567
    01.08.08  345        1         1     8               567
    01.09.08  345        1         1     9               567
    01.10.08  345        1         1    10               567
    01.11.08  345        1         1    11               567
    01.12.08  345        1         1    12               567
    each row after row 13 ' 01.01.07 567' I wasn't expecting.
    Of course, I can add a predicate CONNECT_BY_ROOT = NR. But I'd like to understand why I get 11 lines for nr with root 567 345.

    Concerning
    Marcus

    Hello

    In a subquery of counter, where you use "CONNECTION BY LEVEL".< x"="" to="" generate="" the="" integers="" 1,="" 2,="" ...,="" x,="" the="">
    in the clause FROM must have only one line.

    Follow these steps:

    WITH
    first_month AS(
        SELECT  TRUNC(dat_begin,'MM') AS first_date
               ,nr
               ,DECODE (invoiced
                        ,'M',1
                        ,'Q',3
                        ,'Y',12
                        ,'E',1000
                        ) AS intervall
               ,duration
               ,cntr.n
        FROM    contract
        )
    ,
    cntr AS
    (   -- Begin counter sub-query
        SELECT  LEVEL   AS n
        FROM    dual
        CONNECT BY  LEVEL <=
         (     -- Begin scalar sub-query to get max range
         SELECT     MAX (duration * 12 / intervall)
         FROM     first_month
         )     -- End scalar sub-query to get max range
    )   -- End counter sub-query
    SELECT  ADD_MONTHS(first_date,(cntr.n - 1) * intervall)  AS all_dates
           ,nr
           ,duration
           ,intervall FROM    first_month
    JOIN     cntr          ON cntr.n <= duration * 12 / intervall
    ;
    

    As you can see, this solution is very similar to to Blushadow.

    "CONNECT BY" involves a parent-child relationship.
    When the CONNECT BY condition does not refer to all the values stored in the table, as in "CONNECT BY LEVEL<=>
    then each row of the table is considered the parent of all the other ranks. So if you have lines J in the table,
    you will have lines J at LEVEL = 1, lines J * J = 2 level, J * J * J ranks to LEVEL = 3,..., lines power (j, k) = k level.

    I don't think that the query you posted has produced the results you've posted.
    The query has five columns in the SELECT clause and the result set includes six.

    What is the purpose of the last column with CONNECT_BY_ROOT? If this is supposed to be the same as nr.
    then you can have another column containing nr.

  • Can I see all my favorites in the Favorites bar, even if they are too many... I want to make additional lines and continue, instred of the arrow/list system.

    I would like to have instant access to all my favorites that I keep my RSS links and ongoing projects there. When they are too many to fit into a line across the screen firefox makes a small drop down menu at the end with everything else in. I find it really boring, it's just the same thing as the bookmarks menu normal; I find it really hard to keep things organized when I can't see all the time. I would like to make a second or even third place in the toolbar, so I still see all my current RSS feeds and Pages. Can I do this? If this does not work on firefox someone know another browser FS, BONES or FREE software that will be?

    Try this extension:

    https://addons.Mozilla.org/en-us/Firefox/addon/6937/

  • UTL_SMTP. ORA-30678: too many open connections. Why?

    Hello

    I use UTL_SMTP for sending email to support staff in some scenarios. IT everything has worked until today, we got following error in Java logs. I searched and found a similar position at [http://asktom.oracle.com/pls/asktom/f/f?p=100:11:0:P11_QUESTION_ID:255615160805 #611756800346679486]
    - Caused By (java.sql
    .SQLException: ORA-20005: prc_my_sp - ORA-30678: too many open connections
    ORA-06512: at "SYS.UTL_TCP", line 28
    ORA-06512: at "SYS.UTL_TCP", line 257
    ORA-06512: at "SYS.UTL_SMTP", line 115
    ORA-06512
    ORA-06512: at "MY_PKG", line 1378
    {code}Still, I'm not able to make out how to resolve this error.
    
    We use 
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    Please throw some light on cause and resolution.
    
    
    
    Thanks,
    Sam
    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Yes, you need to open the connection outside of the loop.

  • error "too many concurrent connections" with Gmail

    I started all of a sudden the error "too many concurrent connections" with Gmail with one of my gmail accounss. I googled and it seems like an old problem and I tried all the recommended solutions, but none worked. I have two gmail accounts and the other continues to function properly. Suggestions!

    Reduce the number of labels has solved this problem. Seems specific to TB and GMail (google says you can have hundreds of emails - I have about 60). There are mentions of which can be found via google - but no definitive statement on the problem, with workarounds, etc.. Now I will be anxious the next time I have to add a label, not knowing if it will work or cause this problem.

  • HP laptop: enter the model number and get a "game too many results.

    My HP laptop dies after 6 weeks. When I contact support, he asks the model number. I enter: say "15-ay041wm" is what the box and laptop. I get a reply that says.

    "Sorry, too many results match your search for 15-1y041wm.

    "So I try HP Notebook, I get the same mesaage above, except with the HP laptop ' instead of '15-ay041wm.

    Because no matter where I'm going, he wants the model number and I give, I can't help. No cat, no nothing.

    So someone can tell me how to get support?

    If HP is unable to handle the number of model of it's own computers, so I'm not very confident.

    Here are the free support number to call in the USA/Canada... 1 800-474-6836.

    Now here's another question, you can report to HP on if you want...

    You must stay online and listen to the automated assistant trying to talk to you to talk to a representative... visit the HP website... go to this support forum (which has no official presence in HP), etc.

    After a minute or two, the Assistant to say, if you can't get online, will stay on the line to speak to a customer services representative.

    This is when you will have the opportunity to speak with a support person and report the problem to open a pension case.

  • sudden error "too many listeners on GPIB.

    Out of the blue, I'm suddenly in the face of this "too many listeners on the GPIB" error, and my PC has found is more all instruments in NOR-MAX. I have a GPIB-USB-HS connected to my PC and 8 instruments (some HP4142b, Keithley instruments, electricity, etc.), Garland with different GPIB cables... I was able to control them in LabVIEW and summer don't saw no problem with it for months.

    Then yesterday, LabVIEW (I have 2012) suddenly hung when I tried to access one instruments (which went in the State "is not responding"). He could see to the recovery, is no longer one of my instruments GPIB on the menu drop down. I rebooted LabVIEW, but still the same thing... could no longer see my GPIB instruments. I rebooted the PC and the same issue. Then, I could see no longer the GPIB instruments in NOR-MAX. I spent a few hours of debugging, try different configurations, connection to 1 or 2 instruments at once... now with this new Setup, I am able to let him see 7 of my instruments, but not all 8. I have a system to Keithley 7001, it doesn't seem to like more... When I connect it to the rest of the GPIB instruments, I get the "too many listeners' error and can not see all the instruments in Max weird because I have two of these 7001 s in my installation, and it is seems ok connection to one but not the other.

    Overall it is really strange and I can't figure out what that might be the problem... would appreciate advice/suggestions.

    I have checked/tried things

    -all GPIB instruments have unique addresses... There is no conflict of interest. as I said, things worked fine before... Suddenly, they were not.

    -doesn't seem to be a problem of GPIB cable. I tried different cables... same cable will be allowed to connect to a single instrument, but when I use it to connect to this particular Keitlhley instead, none of the instruments can be found.

    Also, I just noticed something, don't know if this is important... for my GPIB-USB-HS, the 'Ready' light always seems amber glow... it is never green. And never seems to light 'Active' lights... even if I send orders to the instruments.  Not sure if it of important or not.

    OK, I seem to have solved that problem. I changed address GPIB instrument troublesome Keithley to a number much more than the other instruments (e.g. addr 30 and other instruments were 10, 11, 12, etc.) and it worked. I don't know why it didn't work until he was NOT an address conflict (it was originally addr 9 and no other instrument has this address and it worked fine... just one day he complained there are too many listeners and he could not see what be it... strange. just this announcement here in the case where he helps to anyone.)

  • My account has been blocked because someone entered the password wrong too many times

    My account has been blocked because someone entered the password wrong too many times. I did a reset on my password but I can't evaluate my account for more than 24 hours now, why?

    You did not bother to tell which e-mail program you use.

    So, let's assume that it is one of them.

    View all Windows Live and Hotmail questions in the appropriate forum found here:
    http://windowslivehelp.com/

  • Too many active services.

    I have a site with very high success rates that are protected by IPS. There have been complains some deleted request so I went through the IPS event viewer and I found a lot of this:

    evError: eventId = 1321353761353146007 = severity = error Cisco vendor

    Author:

    hostId: xxx

    appName: sensorApp

    appInstanceId: 17803

    time: xxx

    errorMessage: too many assets services (2048) in external/tcp. Rejected event for port [random_port_number] name = errUnclassified

    Does anyone know if this connected and when / if the amount of active services can be controlled?

    Additional information:

    Platform: WS-SVC-JOINT-2

    Build version: 7.0 (6) E4

    By-pass: auto

    Any help will be much appreciated.

    Concerning

    Mariusz

    To work around the problem, you can disable the feature of anomaly detection.

    Kind regards

    Sawan Gupta

  • Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [4 primary key].

    Mr President

    I am able to add records with the following method but when I navigate through folders and then I get the above error.

    When you use this code in my doDML()

    package model;
    
    
    import java.sql.PreparedStatement;
    
    
    import oracle.jbo.Key;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.EntityDefImpl;
    import oracle.jbo.server.EntityImpl;
    import oracle.jbo.server.SequenceImpl;
    import oracle.jbo.server.TransactionEvent;
    // ---------------------------------------------------------------------
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Tue Nov 10 11:03:43 PKT 2015
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    // ---------------------------------------------------------------------
    public class TableNameImpl extends EntityImpl {
        /**
         * AttributesEnum: generated enum for identifying attributes and accessors. DO NOT MODIFY.
         */
        public enum AttributesEnum {
            Column1,
            Column2,
            Column3,
            JoinColumn,
            HiddenColumn;
            private static AttributesEnum[] vals = null;
            private static final int firstIndex = 0;
    
    
            public int index() {
                return AttributesEnum.firstIndex() + ordinal();
            }
    
    
            public static final int firstIndex() {
                return firstIndex;
            }
    
    
            public static int count() {
                return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
            }
    
    
            public static final AttributesEnum[] staticValues() {
                if (vals == null) {
                    vals = AttributesEnum.values();
                }
                return vals;
            }
        }
        public static final int COLUMN1 = AttributesEnum.Column1.index();
        public static final int COLUMN2 = AttributesEnum.Column2.index();
        public static final int COLUMN3 = AttributesEnum.Column3.index();
        public static final int JOINCOLUMN = AttributesEnum.JoinColumn.index();
        public static final int HIDDENCOLUMN = AttributesEnum.HiddenColumn.index();
    
    
        /**
         * This is the default constructor (do not remove).
         */
        public TableNameImpl() {
        }
    
    
        /**
         * Gets the attribute value for Column1, using the alias name Column1.
         * @return the value of Column1
         */
        public Number getColumn1() {
            return (Number) getAttributeInternal(COLUMN1);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column1.
         * @param value value to set the Column1
         */
        public void setColumn1(Number value) {
            setAttributeInternal(COLUMN1, value);
        }
    
    
        /**
         * Gets the attribute value for Column2, using the alias name Column2.
         * @return the value of Column2
         */
        public Number getColumn2() {
            return (Number) getAttributeInternal(COLUMN2);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column2.
         * @param value value to set the Column2
         */
        public void setColumn2(Number value) {
            setAttributeInternal(COLUMN2, value);
        }
    
    
        /**
         * Gets the attribute value for Column3, using the alias name Column3.
         * @return the value of Column3
         */
        public Number getColumn3() {
            return (Number) getAttributeInternal(COLUMN3);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column3.
         * @param value value to set the Column3
         */
        public void setColumn3(Number value) {
            setAttributeInternal(COLUMN3, value);
        }
    
    
        /**
         * Gets the attribute value for JoinColumn, using the alias name JoinColumn.
         * @return the value of JoinColumn
         */
        public Number getJoinColumn() {
            return (Number) getAttributeInternal(JOINCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for JoinColumn.
         * @param value value to set the JoinColumn
         */
        public void setJoinColumn(Number value) {
            setAttributeInternal(JOINCOLUMN, value);
        }
    
    
        /**
         * Gets the attribute value for HiddenColumn, using the alias name HiddenColumn.
         * @return the value of HiddenColumn
         */
        public Number getHiddenColumn() {
            return (Number) getAttributeInternal(HIDDENCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for HiddenColumn.
         * @param value value to set the HiddenColumn
         */
        public void setHiddenColumn(Number value) {
            setAttributeInternal(HIDDENCOLUMN, value);
        }
    
    
        /**
         * @param column1 key constituent
    
    
         * @return a Key object based on given key constituents.
         */
        public static Key createPrimaryKey(Number column1) {
            return new Key(new Object[] { column1 });
        }
    
    
        /**
         * @return the definition object for this instance class.
         */
        public static synchronized EntityDefImpl getDefinitionObject() {
            return EntityDefImpl.findDefObject("model.TableName");
        }
    
    
        /**
         * Add locking logic here.
         */
        public void lock() {
            super.lock();
        }
    
    
        /**
         * Custom DML update/insert/delete logic here.
         * @param operation the operation type
         * @param e the transaction event
         */
        protected void doDML(int operation, TransactionEvent e) {
                if(operation == DML_INSERT)
                    {
                      SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
                      oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
                      setJoinColumn(seqValue);
                      insertSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                   
                    if(operation == DML_UPDATE)
                    {
                      updateSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                super.doDML(operation, e);
            }
          
            private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
                  System.out.println("sql= " + sql);  
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
            
              private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
                  System.out.println("sql= " + sql);    
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
        }
    
    
    

    To me the error.

    Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[4 ].
      at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:862)
      at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:555)
      at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:9089)
      at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:7664)
      at oracle.jbo.server.EntityImpl.merge(EntityImpl.java:8008)
      at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1189)
      at oracle.jbo.server.EntityCache.add(EntityCache.java:579)
      at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3454)
      at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:4062)
      at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:6351)
      at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:4145)
      at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:4000)
      at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2491)
      at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5540)
      at oracle.jbo.server.ViewRowSetIteratorImpl.getRowInternal(ViewRowSetIteratorImpl.java:3590)
      at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:2007)
      at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:3859)
      at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:11845)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:473)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:300)
      at oracle.jbo.uicli.controls.JUNavigationBar._isEnabled(JUNavigationBar.java:1345)
      at oracle.jbo.uicli.controls.JUNavigationBar._updateButtonStates(JUNavigationBar.java:1334)
      at oracle.jbo.jbotester.app.NavigationBar._updateButtonStates(NavigationBar.java:123)
      at oracle.jbo.uicli.controls.JUNavigationBar$3.run(JUNavigationBar.java:1249)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    
    

    Concerning

    You can't repeat the value of pharmacokinetics in several lines. try to follow this:

    1. in your database to create new sequence "PK_SEQ".

    2. in doDML write this

        if (operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          setPKey(getPkSeqNextNumber())
          insertSecondRowInDatabase(getPkSeqNextNumber(), getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
        }
    

    the getPkSeqNextNumber will be

    private Number getPkSeqNextNumber()
    {
      SequenceImpl pkSeq = new SequenceImpl("PK_SEQ", getDBTransaction());
      return pkSeq.getSequenceNumber();
    }
    

    or

    You can do a trigger in the database, this trigger Gets the value of the sequence and sets the pkey to insert before

  • counter incremented too many times

    Hi I have a code where my cost is incremented too many times I try to know where, is there anyone can help

    hear is a formatted code How to adjust and optimize the Code POI exports adf table except he's usingSXSSFWorkbook

    Line 54 # in the referenced code list is redundant:

    rowCounter ++;

    In this way you are increment the line counter when looping through the columns, which does not. Just remove this line.

    Dimitar

Maybe you are looking for