Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL Developer log has no source/message

User_K2AC3May 22 2014 — edited May 23 2014

I'm not sure if I'm missing something obvious here. I have a stored procedure for my Oracle SQL server (11g).

I'm using flow control to keep my INSERT, UPDATE, DELETE functionality within 1 stored procedure. The weird issue I'm running into is that all of the functionality of this works, but when running an UPDATE or DELETE I receive a log from SQL Developer that has no source or message. The proper changes are committed to the database, but I receive an annoying blank log and I am just confused at this point.

Any info would be great! Thanks

create or replace PROCEDURE          DRAWINGOPERATION

(

  P_CURSOR OUT SYS_REFCURSOR

, P_OPERATION IN VARCHAR2

, P_DRAWINGID IN NUMBER

, P_DRAWINGDATE IN DATE

, P_PRIZEAMOUNT IN VARCHAR2

, P_GAMEID IN NUMBER

) AS

BEGIN

  DECLARE

    return_drawingid NUMBER;

  BEGIN

 

  CASE p_operation

  WHEN 'INSERT' THEN GOTO c_Insert;

  WHEN 'UPDATE' THEN GOTO c_Update;

  WHEN 'DELETE' THEN GOTO c_Delete;

  ELSE GOTO end_sec;

  END CASE;

  <<c_Insert>>

      INSERT INTO DRAWING(GAMEID,DRAWINGDATE,PRIZEAMOUNT) VALUES (p_gameid,p_drawingdate,p_prizeamount)

      RETURNING DRAWINGID

      INTO return_drawingid;

      COMMIT;

      OPEN P_CURSOR FOR SELECT * FROM DRAWING WHERE DRAWINGID = return_drawingid;

      GOTO end_sec;

 

  <<c_Update>>

      IF p_drawingdate IS NOT NULL THEN UPDATE DRAWING SET DRAWINGDATE = P_DRAWINGDATE WHERE DRAWINGID = P_DRAWINGID; END IF;

      IF p_prizeamount IS NOT NULL THEN UPDATE DRAWING SET PRIZEAMOUNT = P_PRIZEAMOUNT WHERE DRAWINGID = P_DRAWINGID; END IF;

      COMMIT;

      GOTO end_sec;

   

  <<c_Delete>>

      --PRIMARY KEY DELETE

      DELETE

      FROM DRAWING

      WHERE drawingid = P_DRAWINGID;

      GOTO end_sec;

     

  <<end_sec>>

  NULL;

 

  END;

END DRAWINGOPERATION;

Comments

390020
Works ok in my environment (note I'm using python 2.5).

-----
$ ipython
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
Type "copyright", "credits" or "license" for more information.

In [1]: import cx_Oracle as ora

In [2]: con_str = "i/me@mine"

In [3]: con = ora.connect(con_str)

In [4]: type(con)
Out[4]: &lt;type 'cx_Oracle.Connection'&gt;

In [5]: con = ora.Connection(con_str)

In [6]: type(con)
Out[6]: &lt;type 'cx_Oracle.Connection'&gt;
-----
Q: what is the output if you do:

type(connection_string)


?

675949
type(connection)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'connection' is not defined
390020
I asked for connection_string, not connection. Also I'm assuming you're running it in the same python session you run the previous code you show us. Is that right?
675949
Here is the code.....

Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import cx_Oracle
connection_string = "system/mypass@GLOBAL"
connection = cx_Oracle.Connection(connection_string)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cx_Oracle.DatabaseError: ORA-24315: illegal attribute type
type(connection_string)
<type 'str'>
>>>




I am doing all this under the same python session.
390020
Since I was unable to find out what is happening, I forwarded your problem to the cx-oracle-users list. You can find an answer over there. Here's [the link|http://sourceforge.net/mailarchive/forum.php?forum_name=cx-oracle-users&max_rows=25&style=nested&viewmonth=200812&viewday=19].
730306
I encountered this problem today, and there was no answer on the web.
This is what I learned, although it is embarassing to admit. I had installed
the Ora11g version of cx_Oracle, but the database is Ora10g. I deleted
the Ora11g cx_Oracle files, installed the Ora10g version, and everything
worked.
&nbsp;&nbsp;&nbsp;&nbsp;--dang
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 20 2014
Added on May 22 2014
3 comments
1,732 views