Oracle 7 - 'UPDATE' fails in Stored Procedure

From: James J. Yorton <yorton_at_bison.cig.mot.com>
Date: 16 Dec 1993 22:05:24 GMT
Message-ID: <2eqm34$mp7_at_delphinium.rtsg.mot.com>


I am attempting to do table updates (UPDATE tablename ...) from within a stored procedure, but the table will not get updated.

In all instances, I get no error messages and I have a clean compile, so I know there are no syntax errors.

I also put in debug statements to print out the parameters to the stored procedure. They are *exactly* what they should be, with no hidden white spaces.

There are 3 scenarios that I try:

  1. Called from a Pro*C program
  2. Called from the SQL> prompt with: execute procedurename(arg1,arg2...)
  3. Manually type in the exact UPDATE tablename... statement at the SQL> prompt

When I create/compile the procedure I get:

        Procedure created.

And when I run it from the SQL> prompt with execute, I get:

        PL/SQL procedure successfully completed.

Scenarios 1) and 2) above fail to update the table. And I am doing a COMMIT. I then look at the table entry with SELECT and it's the old data. %ROWCOUNT returns as 1. I would assume its telling me one row was updated, but it's not.

Scenario 3) will update the table, but I'm bypassing the programatic language portion and stored procedure.

Version Info:
ORACLE7 Server Release 7.0.13.1.0 - Production With the procedural and distributed options

PL/SQL Release 2.0.15.1.0 - Production
SQL*Plus: Release 3.1.2.2.1 - Production Pro*C: Release 1.5.7.0.1 - Production

This is on a Sparc, Sun OS 4.1.3. Is there version incompatibility?

Any assistance would be appreciated. Responses in email are preferred. Thanks.

------------------------------+------------------------------------
Jim Yorton                    | Telephone:  +1 708-632-6695
Motorola Inc.                 |
General Systems Sector        | Internet:   yorton_at_cig.mot.com
Cellular Infrastructure Group | UUCP:       ...!uunet!motcid!yorton
Arlington Heights, IL USA | Received on Thu Dec 16 1993 - 23:05:24 CET

Original text of this message