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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I pass a VB.NET DataSet into an Oracle Strored Procedure cursor ?

600295Sep 27 2007 — edited Mar 3 2010
I'm using

ASP.NET 2.0

ODP.NET 9.2

Oracle 9i

Here is my oracle sp:

procedure stored_procedure
(
csr_in in Types.cursor_type
)
is
testx integer;
begin
SELECT 1 INTO testx
FROM
DUAL;
end;


Here is my VB.NET Method:


Private Sub Method()
Dim conn As New OracleConnection("Server=X;Uid=X;Pwd=X")

Dim cmd As New OracleCommand()
Try

Dim ds As DataSet = Function_that_returns_a_data_set()
cmd.Connection = conn

cmd.CommandText = "stored_procedure"

cmd.CommandType = CommandType.StoredProcedure

cmd.Parameters.Add(New OracleParameter("csr_in", Oracle.DataAccess.Client.OracleDbType.RefCursor)).Value = ds
conn.Open()

cmd.ExecuteNonQuery()

Catch ex As Exception

' IM GETTING THIS ERROR

' Unknown datatype System.Data.DataSet for

' parameter value of type Object.

Finally

conn.Close()

End Try

End Sub



Thanks!

L. Skynyrd
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2010
Added on Sep 27 2007
15 comments
11,264 views