Got PLS-00201 error when I call PS/SQL procedure from .NET app in C#
656174Aug 21 2008 — edited Sep 16 2009Hi Experts,
I tried to call a pl/sql procedure TEST_COMP from a .NET app in C# and got the following error, but the same code worked in VB, any advice?
Thanks,
James
ORA-06550: line 1, column 7:
PLS-00201: identifier 'UTIL_PKG.TEST_COMP' must be declared
ORA-06550: line 1, column 7:
UTIL_PKG is the name of package, I logged in as the owner of the package.
Here is the C# code, that gets an error:
-------------------------------------------------------------------------------------
string cmdString = "UTIL_PKG.TEST_COMP";
OracleCommand cmd = new OracleCommand(cmdString,con);
cmd.CommandType = CommandType.StoredProcedure;
try
{
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Here is the VB code that works:
-----------------------------------------------------------------------------------------------
Dim cmdString As String = "UTIL_PKG.TEST_COMP"
Dim cmd As OracleCommand = New OracleCommand(cmdString)
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
Try
cmd.ExecuteNonQuery()
Catch ex As Exception
Console.WriteLine(ex.Message)