Form button doing both update and moving to next row

How do I get a form button to do an update of the shown row, and then move on to the next row in the resultset?
I've tried to assign both the doQuery; and doNext; functions in the same PL/SQL button event, but with no luck.

Hi,
Call this code in the plsql event of the update button.
--- Type your PL/SQL code here...
doUpdate;--- This is the default handler
onNEXT(
p_block_name => p_block_name ,
p_object_name => p_object_name,
p_instance => p_instance ,
p_event_type => p_event_type ,
p_user_args => p_user_args ,
p_session => p_session);
--- ...and here, thanks...
Thanks,
Sharmila

Similar Messages

  • Creation of a Single button for both Update and Insert

    Hi,
    I want to create a button which performs both Insert and Update function. As of now i have 2 seperate buttons. Can I combine them in to one by writing a procedure which checks for the data in the database...If the record exists, then it should update the record, if not it should insert...Please guide me
    Regards,
    Pa

    Hi,
    If I am inserting in to the table a new record, how do I check for that column in the table...
    It should work this way..
    I have a list of users in a page, if I click on any user name, it will redirect me to another screen which will allow me to create a record for the selected user name. I want to check the selected user name in the table. If it is already existing then need to update, else insert.
    Regards,
    Pa

  • Unique Key Violation While Doing Multiple Updates And Create in EJB

    Hello All,
    I am using oracle 9i and Weblogic 7.0. I have a table that has a unique key constraint on one column , say 'Col1' and i am using a CMP to read,create and update data in this table. The problem description is as follows.
    I have JTable that display the data from the above said table. The user can modify the existing data and insert new data that will be reflected in the DB using the CMP. Let us say the following are displayed
    ROW1
    Col1 : 3
    Col2 : 'ABC'
    Col3 : 1 (Primary key in the table)
    Now the user modifies the above row and inserts a new record. Now the following will be the display
    ROW1 (Modified)
    Col1 : 4
    Col2 : 'ABC'
    Col3 : 1 (Primary key in the table)
    ROW2 (New)
    Col1 : 3
    Col2 : 'DEF'
    Col3 : 2 (Primary key in the table)
    When the above data is saved i do the following in the Code
    a) Session Bean
    For (all the data in the Jtable)
    try
    home.findByPrimaryKey(Col3);
    remote.update(Col1,Col2);
    catch(FinderException fe)
    home.create(Col1,Col2,Col3);
    When the above code is run During the first loop the update runs succesfully (i.e update old value of 3 with 4 ) but during the 2nd loop the create (i.e Insert new value 3) gives me the unique key violated exception. The following is the stack trace
    <Oct 25, 2004 11:36:22 AM IST> <Info> <EJB> <010049> <EJB Exception in method: ejbPostCreate: java.sql.SQLException: ORA-00001: unique constraint (UAT_CYCLE2_1.UK_PYMT_DET_TX) violated
    java.sql.SQLException: ORA-00001: unique constraint (UAT_CYCLE2_1.UK_PYMT_DET_TX) violated
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1892)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2130)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2013)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2869)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
    at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:509)
    at de.dl.ucs.contract.entity.TerminalPaymentsCMP_kbdoop__WebLogic_CMP_RDBMS.__WL_create(TerminalPaymentsCMP_kbdoop__WebLogic_CMP_RDBMS.java:1435)
    at de.dl.ucs.contract.entity.TerminalPaymentsCMP_kbdoop__WebLogic_CMP_RDBMS.ejbPostCreate(TerminalPaymentsCMP_kbdoop__WebLogic_CMP_RDBMS.java:1353)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.DBManager.create(DBManager.java:1023)
    at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:904)
    at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:180)
    at de.dl.ucs.contract.entity.TerminalPaymentsCMP_kbdoop_LocalHomeImpl.create(TerminalPaymentsCMP_kbdoop_LocalHomeImpl.java:73)
    at de.dl.ucs.contract.helperclasses.SubsegmentMaintanence.saveTerminalPayments(SubsegmentMaintanence.java:697)
    at de.dl.ucs.contract.controller.SubsegmentSL.saveSubsegmentDetails(SubsegmentSL.java:570)
    at de.dl.ucs.contract.controller.SubsegmentSL.processFinanceSubsegmentSave(SubsegmentSL.java:1601)
    at de.dl.ucs.contract.controller.SubsegmentSL_kgzv4j_EOImpl.processFinanceSubsegmentSave(SubsegmentSL_kgzv4j_EOImpl.java:498)
    at de.dl.ucs.contract.events.FinanceSubsegmentBEH.saveSubsegmentDetails(FinanceSubsegmentBEH.java:749)
    at de.dl.ucs.contract.events.FinanceSubsegmentBEH.processEvent(FinanceSubsegmentBEH.java:232)
    at de.dl.ucs.framework.flowcontroller.ControllerBean.delegateAction(ControllerBean.java:229)
    at de.dl.ucs.framework.flowcontroller.ControllerBean_riqvk4_EOImpl.delegateAction(ControllerBean_riqvk4_EOImpl.java:46)
    at de.dl.ucs.framework.flowcontroller.ControllerBean_riqvk4_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:441)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:382)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:726)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:377)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    >
    <Oct 25, 2004 11:36:22 AM IST> <Info> <EJB> <010051> <EJB Exception during invocation from home: [email protected] threw exception: javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception is: java.sql.SQLException: ORA-00001: unique constraint (UAT_CYCLE2_1.UK_PYMT_DET_TX) violated
    Please help me with this, as far as i am concerned since both update and create is in the same transaction the update on the row must be visible to the create and hence there shouild not be any problem.....
    thanks in advance
    Shanki

    Hi,
    Thanks,
    There are 3 columns involved with that table . Out of whihc one is a Primary Key (string) , The other column (Number) has a unique key constraint defined on it and the last column stores a value corresponding to the 2nd column.
    The reason for me to do a create in the Finder exception is as follows.
    I Loop through the Data present in JTable. As given in the example let us assume that there are 2 rows in the JTable. Out of whihc the First row needs an updation and the second row , which is a new row needs to be created. So During the First iteration of the loop, The findermethod does not throw any exception (Because it is a modfied row) and hence the update gets fired successfully. During the second iteration , since it is a new row the findermethod will throw a finder exception and hence create will get fired.
    I understand that this is not a good coding style but then it is not 100% wrong and i need to find out as to why it is not working.
    Hope am clear in explaining my problem
    Thanks
    Shanki

  • I tried updating iphone 6 to 8.1.3 But the phone went dead. I have tried using restore options - both update and erase, but the process stops when it tries to update Iphone firmware.

    I tried updating iphone 6 to 8.1.3 But the phone went dead. I have tried using restore options - both update and erase, but the process stops when it tries to update Iphone firmware.

    Put your phone in DFU mode,
    Hold the Power Button (3 secs)
    Continue holding the power button and also hold the home button (15 secs)
    Release the power button while continuing to hold the home button (10 secs)
    Your device should prompt with the "Connect to iTunes Screen"
    Restore.

  • HT4623 I tried doing my update and it told me I don't have enough storage, so I deleted all of my apps, photos, videos, and music. And it's saying I still don't have enough storage. Any suggestions?

    I tried doing my update and it told me I don't have enough storage, so I deleted all of my apps, photos, videos, and music and I still don't have enough storage. Any suggestions?

    Do you memeber the complete wording of the error message?
    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar

  • My macbook pro keeps booting up, then after a few seconds, goes back to the sign in page. This happened after I was doing software updates and my computer restarted in the middle of an update. Help! Thanks.

    My macbook pro keeps booting up, then after a few seconds, goes back to the sign in page. This happened after I was doing software updates and my computer restarted in the middle of an update. Help! Thanks.

    Start up in Safe Mode.
    http://support.apple.com/kb/ph14204
    Repair Disk    Section: "Try Disk Utility"
    http://support.apple.com/en-us/HT203176

  • My ipod touch 5th generation is not turning on and i cant restart it because the home button does not work and it will not connect to anything

    my ipod touch 5th generation is not turning on and i cant restart it because the home button does not work and it will not connect to anything

    Get it fixed then, make an appointment with the Apple genius bar.

  • Form report with both edit and column link

    hi experts,
    How can we create form report with both edit and column link. Ie, the form should have both the Edit link and column link. When we click on the edit link(in page1) it should go for the page2 and the page2 should display the corresponding row fields which should be editable. but when i click the column link it should bring me to the next page but the corresponding values of the column should not be editable.
    Regars,
    KK

    hi,
    Here i have achieved this by making the column link and page navigation.

  • E52 Date Display does not update and reflect the c...

    Right from day 1 the display date of my E52 does not update and reflect correct the correct date. Got the phone replaced once still the same issue. Called the customer service and they say there is no such problem with E52. They asked me to go to the repair center...(isnt that ridiculous to ask a customer of a new phone to do so?). I went to the repair center with a hope that they will replace it for me but all in vain. They also gave me a ridiculous answer that Nokia does not have a replacement policy...and I was like so is it Nokia's policy to sell broken and faulty mobiles? I was utterly dejected. The electronic store where I bought also refuse to replace because they think there is a problem and no matter I get it changed it will recur. I still do not have a solution as all my ways of getting this problem resolved are exhausted. Anyone has a solution or came across this issue which can be solved without repairing?

    Ok let me state my problem. There is a date display and at midnight the date should automatically change to the next date. However that does not happen. The dealer makes the following changes Control Panel>Settings>General>Date and time> Automatic time update> On and this does not solve the problem. Then I get the mobile replaced and that too has the same problem. after going through all permutations and combinations the problem persists. To quote the email from the Contact center for Nokia in HK this was what was suggested
    Menu→Ctrl. panel→Settings→General→Date and time→Time zone→please select Hong Kong→Automatic time update→please select Off
    However, if the situation still occurred by following the above settings, please be advised to bring your Nokia E52 along with the valid sales invoice to one of our Hong Kong Nokia Care Centres for the handset checking since we do not have such arrangement of replacing a new phone to you.
    Please help!!!

  • HT201210 I have tried to restore my i phone via itunes after doing the update and it keeps giving unknown error occurred (3194) please help

    I have tried to restore my i phone via  itunes after doing the update and it keeps giving unknown error occurred (3194) please help

    Hello Sam-marchesi,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694#error3194
    Unable to contact the iOS software update server gs.apple.com
    Error 1004, 1013, 1638, 3014, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software and ensure that communication to gs.apple.com is allowed. Follow these stepsfor assistance with security software.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow theadvanced iTunes Store troubleshooting steps to edit the hosts file or revert to a default hosts file. See "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information."
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.
    Best of luck,
    Mario

  • I bought this ipod 4 from a friend the lock button does not work and he doesnt know the password? how do i reset and i cant use my computer????   HELP!!!!!!

    i bought this ipod 4 from a friend the lock button does not work and he doesnt know the password? how do i reset and i cant use my computer????
    HELP!!!!!!

    Place the iOS device in recovery mode usning this program and then then restore via iTunes. The iPod will be erased.
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    For how to restore:
    iTunes: Restoring iOS software

  • How do i restart my ipod touch if the power off button does not work and it is disabled and it say connect to Itunes

    how do i restart my ipod touch if the power off button does not work and it is disabled and it say connect to Itunekyl

    Place the iPod in recovery mode using this program. and then restore via iTunes.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • My home button does'nt work and the screen is unresponsive too.

    My home button does'nt work and the screen is unresponsive too.

    Try a reset:
    Hold the Sleep and Home button down (approximately 10 seconds) until you see the Apple logo.
    Note: Data will not be affected.

  • Form button does not work when a program is moved from Windows 8.2 to Windows 7

    Hi,
    I have a few Excel programs which use the ODBC to get data from Access and which have macros which writes data to an external program, MYOB.
    When the macros tries to write the data to MYOB it fails if I am not running the program in administrator mode.   It seems that Windows 8.2 has a different level of security than Windows 7 and must be run in administrator mode for the ODBC to work. 
    I have had issues after running the program in administrator mode (testing) if I simply do a save (in administrator mode) and then send it to the customer.   The issue is that it just will not work on the customer's site.   I have gotten
    around this in the past by saving any changes, going back out of excel, loading the program again (not in administrator mode) and saving it - before sending it to the customer.   This worked until now.
    For some unknown reason, the last time I sent a program to the customer and carried out the above process, the program stopped working.   Originally I thought that the macro just wouldn't work on windows 7, but eventually found that it is the form button
    that will no longer work when the program is moved from 8.2 to 7.
    Does anyone know why there is an incompatibility between 8.2 and Windows 7 and what I should be doing to ensure that my programs work in my customers environment(windows7)?
    In the meanwhile, I have changed the form button to an activex button and the program works fine in both environments.
    Thanking you in advance,

    there is some OP report after Windows update Dec 2014 macro stop responding ( I cant confirm if this is also related to your issue) its because security update for Office maybe conflict with the active-x that you are installed
    try to
    Close Excel
    Start Windows Explorer.
    Select your system drive (usually C:)
    Use the Search box to search for *.exd
    Delete all the files it finds.
    Start Excel again
    Open that file and save it, and try open at Windows 7
    to get more detail about this issue, I suggest also contact Office forum
    this case also will be solve installing kb3025036
    good luck

  • Back button does not work and homepage does not show on startup

    My back and forward buttons do not work anymore. they just show grey and I can not click on them.
    Also my home page does not show when i start firefox.
    I reinstalled firefox 4 and then went back to firefox 3.6.16 and have the same problem in both versions.
    Not sure what to do anymore
    I just found out that when I open a second window everything works fine in the second window, but it still does not work in the first window.
    When I close both windows the same thing happens. The first window my home page does not show up and the back button does not work, but the second window works normal. Including my home page.

    Yeah, I am having the same problem (with 4.0 and earlier versions). It is really frustrating to say the least. I never thought I'd say this, but I might have to go back to IE if FF is going to be this useless. I noticed that you have to right click (instead of left click like it works in the real world) on the backwards/forwards buttons, and that is no less frustrating since my mouses backwards/forwards buttons no longer work with this new asinine button set up.

Maybe you are looking for