Update statement will not commit changes

I'm having a problem in Forms 4.5. I have a stored procedure that updates a table. I can call the stored procedure from a trigger within a form and it will work perfectly. However, when I copy the code from the stored procedure into a program unit, and call that program unit instead of the stored procedure, it doesn't work. It executes without generating any error messages, but the database remains unchanged. If anyone has seen this before, please help.
Thanks in advance,
Steve

In my form I have a block with a button. Within the WHEN-BUTTON-PRESSED trigger of that button I have the following code that calls a stored procedure:
UPDATE_RECORDS(code, date, ord_id);
This is the code for the stored procedure:
PROCEDURE UPDATE_RECORDS (
in_code IN NUMBER(6)
,in_date IN DATE
,in_ord_id IN NUMBER(6)) IS
BEGIN
UPDATE
count_records
SET
ord_id = in_ord_id
WHERE
id IN (
SELECT
cr.id
FROM
count_records cr
,orders ord
,items itm
,work_locs wl
WHERE
wl.code = in_code
AND itm.wl_id = wl.id
AND ord.itm_id = itm.id
AND cr.ord_id = ord.id
AND cr.starting_time >= in_date
COMMIT;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Update of records has failed.');
END UPDATE_RECORDS;
When I click on the button the trigger fires and the stored procedure executes. I can then query the database to confirm that the changes have taken place in the count_records table.
However, I've taken the code in the stored procedure and placed it in a Program Unit. I've changed the WHEN-BUTTON-PRESSED trigger to call the program unit:
UPDATE_RECORDS_WITHIN_FORM(code, date, ord_id);
This is the code for the Program Unit:
PROCEDURE UPDATE_RECORDS_WITHIN_FORM (
in_code IN NUMBER(6)
,in_date IN DATE
,in_ord_id IN NUMBER(6)) IS
BEGIN
UPDATE
count_records
SET
ord_id = in_ord_id
WHERE
id IN (
SELECT
cr.id
FROM
count_records cr
,orders ord
,items itm
,work_locs wl
WHERE
wl.code = in_code
AND itm.wl_id = wl.id
AND ord.itm_id = itm.id
AND cr.ord_id = ord.id
AND cr.starting_time >= in_date
COMMIT;
EXCEPTION
WHEN OTHERS THEN
MESSAGE('Update of records has failed.', ACKNOWLEDGE);SYNCHRONIZE;
END UPDATE_RECORDS_WITHIN_FORM;
When I click on the button the trigger fires and the program unit executes. The error message never appears, but when I query the database, there are no changes to the count_records table.
This seems really strange and I would appreciate any help on this.
Thanks,
Steve

Similar Messages

  • Update statement will not update

    What is wrong with this statement?
    UPDATE agendasCRA SET agenda = 'co080918agenda.pdf' WHERE ID
    = '7'
    The table is agendasCRA
    The field to be updated is agenda
    the data to be updated is co080918agenda.pdf
    and the ID field is 7
    the agenda field is a varchar(32)
    the ID field is an int(10) unsigned auto_increment
    When entered as a MySQL command in phpMyAdmin, I get Affected
    rows: 0
    What am I doing wrong?
    Thanks,
    Harvey

    eclipsme posted in macromedia.dreamweaver:
    > Mark A. Boyd wrote:
    >> eclipsme posted in macromedia.dreamweaver:
    >>
    >>> What is wrong with this statement?
    >>>
    >>> UPDATE agendasCRA SET agenda =
    'co080918agenda.pdf' WHERE ID =
    >>> '7'
    >>>
    >>> The table is agendasCRA
    >>> The field to be updated is agenda
    >>> the data to be updated is co080918agenda.pdf
    >>> and the ID field is 7
    >>>
    >>> the agenda field is a varchar(32)
    >>> the ID field is an int(10) unsigned
    auto_increment
    >>>
    >>> When entered as a MySQL command in phpMyAdmin, I
    get Affected
    >>> rows: 0
    >>
    >> That can happen if there is no record existing yet
    where ID = 7
    >>
    >> or
    >>
    >> if agenda already contains co080918agenda.pdf
    (nothing to update)
    >>
    > There is an existing record wither ID = 7
    > The agenda field for ID 7 is empty
    >
    > Any other ideas?
    Maybe adding back ticks to the field names?
    UPDATE `agendasCRA` SET `agenda` = 'co080918agenda.pdf' WHERE
    ID = 7
    But I just did a test on my local server that worked fine
    with the
    following three (emptying the agenda field between tests).
    The first is
    copied directly from your OP.
    UPDATE agendasCRA SET agenda = 'co080918agenda.pdf' WHERE ID
    = '7'
    UPDATE agendasCRA SET agenda = 'co080918agenda.pdf' WHERE ID
    = 7
    UPDATE `agendasCRA` SET `agenda` = 'co080918agenda.pdf' WHERE
    ID = 7
    I can't seem to make it fail. BTW, here is the table I used:
    CREATE TABLE `agendascra` (
    `ID` int(11) NOT NULL auto_increment,
    `agenda` varchar(32) NOT NULL,
    PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM;
    Followed by 7 empty inserts.
    Mark A. Boyd
    Keep-On-Learnin' :)

  • After loading the latest Aperture 3 update, aperture will not load and it appears to have corrupted 10.6.  10.6.7 now appears to be missing from the computer and my administrator status has changed to standard.

    After loading the latest Aperture 3 update, aperture will not load and it appears to have corrupted 10.6.7. and now appears to be missing from the computer and my administrator status has changed to standard.  Update Software says I need to do update to 10.6.7 which I can't do because administrator privileges are gone.   I didn't back-up with Time Machine ,BAD, but I have all files backed-up on another hard drive.  Should I just reformat and start over?  Any ideas or help would be appreciated.

    PROBLEM SOLVED! For me at least!
    Apple Support gave me the clue - I had run Migration Assistant, and it had obligingly replaced a system file (/Library/Frameworks/PluginManager.framework/Versions/B/PluginManager) with the equivalent from my old system.
    I reinstalled 10.6.7 using the DVD supplied and all is well.
    The moral is - don't use Migration Assistant.
    Along the way Apple Support provided me with a link to download Combo update 10.6.7: this could not be installed on my iMac.
    Hope this helps.

  • My Wells Fargo bank statement will not open in Firefox. I have to use Safari. Please fix and let me know the reason.

    My Wells Fargo bank statements will not open in a viewable format.

    Here is a link to Wells Fargo "Online Statements Questions": https://www.wellsfargo.com/help/faqs/statement_faqs
    *click on the item "How can I view or get copies of my Online Statements?"
    *scroll down to "Viewing Online Statements"
    *it says:
    **You need Adobe® Reader® to view, print, or save your statement. If you do not have it, you can download Adobe Reader for free.
    I do not see a PDF Reader plugin in the list of plugins submitted with your question.
    *See Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • When the update statement will check the constraint violation ?

    Hello all,
    i am working on data masking of production data using oracle Translate function.i have created a function otis_mask using translate function to mask sensitive values .For this i am tesitng on a small table. i have created a table with single primary key column SSN.
    sql>desc SSN_MASK
    Name Null? Type
    SSN NOT NULL NUMBER(10)
    1) i have inserted the value 9949577766. if resulted mask value exist in table it should throw the constraint violation error.But it is not throwing any error.rows are properly updating .
    Eg:-
    Table contains below values.
    PA_DATA_SUB @qdsrih30 >select *from SSN_MASK;
    SSN
    7727399911
    9949577766
    9989477700
    UPDATE SSN_MASK SET SSN=otis_mask(SSN);
    if above update statement process 7727399911 first then resulted mask value is 9989477700.This value is already in the table.
    if the update statement process 9949577766 first then resulted mask value is 7727399911.This value is already in the table.
    in any of the above scenario update statement should have to throw constraint violation error. But its not happening. rows are properly updating . when the update statement checking the constraint violation ? after processing all the rows or processing of each row ?
    Please help me in understandding the update statement processing ?
    Thanks,
    Venkat Vadlamudi.

    1)created a function as below.
    CREATE OR REPLACE Function otis_mask(incol varchar2) return varchar2 is
    random_str varchar2(20);
    begin
    select (translate(incol,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890','qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0842319576')) INTO random_str FROM DUAL;
    return random_str;
    end;
    2. create a table ssn_mask.
    create table ssn_mask(ssn number(10) primary key);
    3) inserted 3 rows as below.
    insert into ssn_mask values(9949577766);
    insert into ssn_mask values(7727399911);
    insert into ssn_mask values(9989477700);
    4)UPDATE SSN_MASK SET SSN=otis_mask(SSN);
    5) Table contains below rows.
    Sql >select *from SSN_MASK;
    SSN
    9949577766
    7727399911
    9989477700.
    6)UPDATE SSN_MASK SET SSN=otis_mask(SSN);
    If the above statement process first row 9949577766,then otis_mask function will return 7727399911 and update statement will update the value of 9949577766 to 7727399911 .At this case 7727399911 is already in the table.So update statement should have to throw primary key constraint violation error.
    If the above statement process second row 7727399911 first ,then otis_mask function will return 9989477700.and update statement will update the value of 7727399911 to 9989477700.At this case 9989477700 is already in the table.So update statement should have to throw primary key constraint violation error.
    But its not throwing any integrity constraint violation error.
    i just want to know when update statement will check the constraint ?
    is update statement will first process all records and kepp in handy the new values then update the table with new values (or) process the first row and update the new value with old value then process second row and update with new value so on ?
    Thanks,
    Venkat Vadlamudi.

  • My account needs updating but will not accept my card security code

    My account needs updating but will not accept my card security code why?

    As of today, I'm having the same problem. My iTunes account has been up and active for a long time using the same card, then suddenly the security code isn't valid. I've double checked all the info and it is correct, but iTunes refuses to accept it… I also tried the article linked above, but it is no help at all. There is no option to select "None" as a payment choice.
    Just to be very clear: I've been using my iTunes account to make purchases with this exact card since 2009, my bank info hasn't changed since 2008, my card is not expired, and the security code is correct.
    If anyone comes up with a solution, I'd appreciate hearing about it. I can't even get the free updates to my apps since my payment info is busted. Grrrr.

  • Why when I connect to iTunes store for app updates it will not cone t keep getting error messagr

    Why when I connect to iTunes store for app updates it will not cone t keep getting error messagr

    The Complete Guide to Using the iTunes Store
    http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-using-t he-itunes-store/
    iTunes Store: Associating a device or computer to your Apple ID
    http://support.apple.com/kb/ht4627
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/TS3297
    Best Fixes for ‘Cannot Connect to iTunes Store’ Errors
    http://ipadinsight.com/ipad-tips-tricks/best-fixes-for-cannot-connect-to-itunes- store-errors/
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Try this first - Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    This works for some users. Not sure why.
    Go to Settings>General>Date and Time> Set Automatically>Off. Set the date ahead by about a year.Then see if you can connect to the store.
     Cheers, Tom

  • After doing a widows update itunes will not work at all

    after doing a widows update itunes will not work at all

    hiya!
    I get the itunes has encounterd a problem and needs to close, sorry for the inconvenience error, no specific error number. I do not have QT installed,
    not having QT installed is what will be causing your itunes error message at the moment. let's try a careful standalone QT 7.1 install.
    download and save a copy of the QT 7.1 standalone installer to your hard drive. (we'll run the install from there rather than online.) switch off antivirus and antispyware applications prior to the install.
    Quicktime 7.1 Standalone Installer
    if that install goes through okay, does your itunes launch properly again?
    (if you get an error message on the QT standalone reinstall, let us know what it says. include error message numbers if you're getting any.)
    love, b

  • I am trying to update to iTunes 10 to us my new iPad, but I can not remove a corrupted "apple software update" program... I can get everything else off, but due to "previous version" of software update it will not continue.

    I am trying to update to iTunes 10 to us my new iPad, but I can not remove a corrupted? "apple software update" program... I can get everything else off, but due to "previous version" of software update it will not continue.
    I stopped in to see one of the genius at the local store who referred me to "Windows Installer 4.5 Redistributable" (I am trying to install it on a Windows XP System)
    The last version on iTunes on my PC was iTunes 7.
    Thanks for your help,
    Julia from Woodridge

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any Apple Software Update entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • My phone 5s did the new update and will not come back on. I already tried hard reboot still won't work. Been over a hour now. Please someone help I need my phone.

    My phone 5s 16gb gold did the new update and will not come back on. I already tried hard reboot still won't work. Been over a hour now. Please someone help I need my phone.   This phone is not even 6 months old been in case no scratches. This is driving me crazy.

    Connect your phone to a computer and restore your software using iTunes.

  • After an update itunes will not open. there is a missing msvcr80.dll i tried to re install itunes and now it says check system services. I have full admin to pc

    after an update itunes will not open. there is a missing msvcr80.dll i tried to re install itunes and now it says check system services. I have full admin to pc

    turingtest2 post 01/2014: MSVCR80.dll missing, cannot install iTunes - https://discussions.apple.com/message/24618776
    iTunes for Windows: Missing MSVCR80.dll - https://sites.google.com/site/appleclubfhs/support/advice-and-articles/itunes-wi ndows-missing-msvcr80-dll - install as administrator.

  • My ipod touch is not syncing properly. I have updated the software to the latest (2.2.1) and have even resored it. Itunes says it is working and updated but will not sync and apps. Error message says that app will not sync because a newer version needed

    My ipod touch (model A1213) is not syncing properly. I have updated the software to the latest (2.2.1) and have even resored it. Itunes says it is working and updated but will not sync and apps. Error message says that app will not sync because a newer version needed.

    2.2.1 is not the latest available for any ipod touch.
    Is yours the original ipod touch?
    If so then:
    Purchasing iOS 3.1 Software Update for iPod touch (1st generation)

  • Insert statement will not work if select statement has less number of colum

    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshad

    user13360241 wrote:
    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshadmore often than not "TEMP" tables are NOT required & are highly inefficient in Oracle.
    Either only specify explicit column in TEMP to get data,
    or provide value for "extra" column in TEMP

  • My numbers application will not continue an update and will not open due to said incomplete update

    My numbers application will not continue an update and will not open due to said incomplete update

    open the application "LaunchPad" then locate Numbers.  Click and hold on Numbers until is starts to shake.  click the "X" in the top left corner.  click on the desktop to exit this mode.  Now open the App store and install again.

  • TS1702 I have an app that appears to need to be updated. I clicked to update three days ago. It has started to update and will not finish. How can I delete the app while its in the middle of updating?

    IPhone 5
    I have an app that appeared to need to be updated. I clicked to update three days ago. It has started to update and will not finish. How can I delete the app while its in the middle of updating?

    Locked on an update can mean a couple of different things. So there are a number of things to try, but start with these.
    If you have a "waiting" icon, try tapping on the icon and see if you can pause the update/download. Of it pauses, tap on it again and see if it will resume.
    Try holding down on the icon until all of the icons on the screen wiggle. If the X to delete pops up on the waiting/stalled app -  tap the X to delete the app. Tao,the home button and the apps will stop wiggling.
    You can also try this and see if the downloads will resume. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

Maybe you are looking for