Skip to Main Content

ODP.NET

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!

Got PLS-00201 error when I call PS/SQL procedure from .NET app in C#

656174Aug 21 2008 — edited Sep 16 2009
Hi 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)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2009
Added on Aug 21 2008
6 comments
3,662 views