PC Review


Reply
Thread Tools Rate Thread

Accessing Oracle package function from .net?

 
 
AA
Guest
Posts: n/a
 
      12th Jul 2004
Hello, I need to access to a function that is inside a Oracle Package

But When the ORACommand.ExecuteReader is called, this error return:

System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00221: 'TestFunction' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


My Simple code test is...


Dim ORAConn As New OracleClient.OracleConnection(MyConnString)
ORAConn.Open()
Dim ORACommand As New
OracleClient.OracleCommand("dbadmin.testpackage.TestFunction")
ORACommand.Connection = ORAConn
ORACommand.CommandType = CommandType.StoredProcedure
ORACommand.Parameters.Add("Here I add a input parameter")
ORACommand.Parameters.Add("Here I add a output parameter")

Dim RS As OracleClient.OracleDataReader = ORACommand.ExecuteReader() <--
Here the error occur
Dim Result As String = ORACommand.Parameters("funcOut").Value



Please help me

Thanks



 
Reply With Quote
 
 
 
 
AA
Guest
Posts: n/a
 
      12th Jul 2004
I found my error.

I need to set a returnValue parameter (where the function result will be
stored) and execute as "ExecuteNonQuery"



"AA" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello, I need to access to a function that is inside a Oracle Package
>
> But When the ORACommand.ExecuteReader is called, this error return:
>
> System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
> PLS-00221: 'TestFunction' is not a procedure or is undefined
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
>
> My Simple code test is...
>
>
> Dim ORAConn As New OracleClient.OracleConnection(MyConnString)
> ORAConn.Open()
> Dim ORACommand As New
> OracleClient.OracleCommand("dbadmin.testpackage.TestFunction")
> ORACommand.Connection = ORAConn
> ORACommand.CommandType = CommandType.StoredProcedure
> ORACommand.Parameters.Add("Here I add a input parameter")
> ORACommand.Parameters.Add("Here I add a output parameter")
>
> Dim RS As OracleClient.OracleDataReader = ORACommand.ExecuteReader() <--
> Here the error occur
> Dim Result As String = ORACommand.Parameters("funcOut").Value
>
>
>
> Please help me
>
> Thanks
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing arrays returned by Oracle Stored Procedures using Oracle =?Utf-8?B?S3VtYXIuQS5QLlA=?= Microsoft Dot NET Framework 0 18th Nov 2007 04:06 PM
Exception thrown while accessing Oracle through oracle client =?Utf-8?B?TmVv?= Microsoft ASP .NET 2 12th Jul 2005 07:59 PM
ORACLE STORED PROCEDURE IN A PACKAGE =?Utf-8?B?RmF0aWg=?= Microsoft ADO .NET 0 2nd Feb 2005 09:47 AM
Accessing Oracle Ref cursor with Ole DB provider for Oracle =?Utf-8?B?Q2VkcmljIEZBQklPVVg=?= Microsoft Dot NET Framework 4 8th Dec 2004 12:45 PM
how to use Oracle package in C#? matrix Microsoft ADO .NET 2 5th Apr 2004 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:05 PM.