ghalib ghalib - 3 months ago 21
C# Question

Error ora 06576 , Calling Oracle Stored Procedure C#

hi guys am building c# application generated via ASP.NET Maker
And am trying to call oracle procedure so, I wrote the following:

var OraConn = ew_GetConn();
string sql = "CALL CPM.READING_DATA_TEST";
OraConn.ExecuteNonQuery(sql);


Where
reading_data_test
is the name of my stored procedure, And
CPM
the name of schema which contain the procedure
so i got this error

ora-06576: not a valid function or procedure name


And am very sure the name of procedure is correct 100 %

Answer

Maybe you need to add the round brackets:

String sql = "CALL CPM.READING_DATA_TEST()";

I say this because in SQL*Plus you can replicate your error as follows:

SQL> create or replace procedure donull as begin null; end;
  2  /
Procedure created.

SQL> exec donull;

PL/SQL procedure successfully completed.

SQL> call donull;
call donull
     *
ERROR at line 1:
ORA-06576: not a valid function or procedure name


SQL> call donull();

Call completed.

SQL>
Comments