Page 1 of 1

Problem while getting parameters for package function

Posted: Thu 07 Oct 2010 14:05
by roznicki
When UNIDAC is getting parameters for stored procedure that is package function it runs OCIDescribeAny from Oracle OCI API. Unfortunately it leads to ORA-04043: object XXX.XXX does not exist.
Position of this operation : unit:OraClassesUni.pas line 9426 (Unidac 3.00.0.5).

Posted: Thu 07 Oct 2010 14:58
by AlexP
Hello,

Please send me the script to create the package, and I'll try to reproduce the problem.

Testin package

Posted: Fri 08 Oct 2010 07:44
by roznicki
Below is package i use for tests:

Code: Select all

CREATE OR REPLACE PACKAGE TEST_PACKAGE AS
  NAME VARCHAR2(100);
  FUNCTION GETKSHWINDOW RETURN VARCHAR2;
  PROCEDURE SETKSHWINDOW(pNAME VARCHAR2);
END TEST_PACKAGE;
/
CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE AS
  FUNCTION GETKSHWINDOW RETURN VARCHAR2 IS
  BEGIN
    RETURN NAME;
  END;
  --
  PROCEDURE SETKSHWINDOW(pNAME VARCHAR2) IS
  BEGIN
    NAME := pNAME;
  END;
END TEST_PACKAGE;
I run stored procedure and function dynamically (db is TUniConnection - OCI mode (Direct=false)):
db.ExecProc('TEST_PACKAGE.SETKSHWINDOW',['TEST']);
db.ExecProc('TEST_PACKAGE.GETKSHWINDOW',[]);
Invoking dynamically is important because Unidac is collectiong params metadata from Oracle using OCIDescribeAny API function.
Static invoking is working normally.
Hint: there is no exception - procedures are working normally - just Oracle logs :
[1]ORA-04043: object TEST_PACKAGE.SETKSHWINDOW does not exist
[1]ORA-04043: object TEST_PACKAGE.GETKSHWINDOW does not exist
Problem is that I have over 50 thousand lines of this error in logs for 3 days.

Posted: Fri 08 Oct 2010 11:35
by AlexP
Hello,

I couldn't reproduce the problem.
Please tell me your Oracle Client and Server version.
Also please try to reproduce the problem with the latest UniDAC version (3.50.0.12).