Calling stored procedure with long name in direct mode when unicode=true

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
DarrenColes
Posts: 51
Joined: Mon 28 Aug 2006 11:07

Calling stored procedure with long name in direct mode when unicode=true

Post by DarrenColes » Fri 14 Sep 2007 16:27

Using the latest OraDirect version 4 , when making a call to a stored procedure with a long name, if using direct mode with unicode = true the name gets truncated and you get an error because there is no procedure with that name.

eg with this C# code:

Code: Select all

            CoreLab.Oracle.OracleConnection oc = new CoreLab.Oracle.OracleConnection();
            oc.ConnectionString = "pooling = false";
            oc.Direct = true;
            oc.Unicode = true;
            oc.AutoCommit = true;
            oc.Server = "servername";
            oc.Sid="sidname";
            oc.UserId = "schema";
            oc.Password = "password";
            oc.Open();

            CoreLab.Oracle.OracleCommand o2 = oc.CreateCommand();
            o2.CommandType = CommandType.StoredProcedure;
            o2.ParameterCheck = true;
            o2.CommandText = "PKG_app_test_very_long_package.proc_test2_this_is_a_procedure";
            o2.Prepare();
            o2.Parameters["v_name"].Value = "name";
            o2.Parameters["v_category"].Value = "333";
            o2.ExecuteNonQuery();

you get this error returned when it calls prepare:

ORA-20001: ORU-10032: procedure PROC_TEST2_THIS_ within package PKG_APP_TEST_VERY_LONG_PACKAGE does not exist
ORA-06512: at "SYS.DBMS_DESCRIBE", line 198
ORA-06512: at line 1

here are the database definitions needed to run this code:

Code: Select all

CREATE OR REPLACE PACKAGE BODY PKG_app_test_very_long_package IS
 
procedure proc_test2_this_is_a_procedure( 
    v_name        IN varchar2, 
    v_category    IN varchar2) 
 as 
 begin
   if v_name = 'test' then 
    raise_application_error( -20008,to_char(length(v_category))); 
   end if;
   
 end proc_test2_this_is_a_procedure; 

 END PKG_app_test_very_long_package;


CREATE OR REPLACE PACKAGE PKG_app_test_very_long_package IS
 
procedure proc_test2_this_is_a_procedure( 
    v_name        IN varchar2, 
    v_category    IN varchar2);

END PKG_app_test_very_long_package;

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 17 Sep 2007 07:38

I've reproduced the problem. Now we are investigating it.
Look forward to hearing from me soon.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 18 Sep 2007 09:28

This problem is fixed.
Look forward to the next build.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 21 Sep 2007 14:38

Please try new build of OraDirect .NET available for download now!

Post Reply