How to read Cursor data in Out parameter of a SP in VB?

Joined
Jul 14, 2010
Messages
2
Reaction score
0
Hi,

I need to call an Oracle Stored Procedure which takes 1st argument as integer and the 2nd argument is a IN OUT type which returns a cursor.

How i need to declare the IN OUT parameter of type cursor? What is the equivalent type in VB for inputtype cursor?

Below is the signature of my SP...

SamplePackage.GetOldCards (
nYearsOld IN NUMBER DEFAULT 36
,io_CURSOR IN OUT NOCOPY ref_cursor_type
)


In the above, the parameter io_CURSOR is of type cursor (a set records and each record has some set of coloumns in it). How to declare this parameters in VB Script?

Below is how parameters are created in VB Script...

Set objParam1 = objCommand.CreateParameter("nYearsOld", 3, 1, 10, 2)
objCommand.Parameters.Append objParam1
Set objParam2 = objCommand.CreateParameter("io_CURSOR", ???, 3)
objCommand.Parameters.Append objParam2
objCommand.Execute

Also, please suggest how to read the cursor data and display to the user.

A sample code would be more helpful for me.

Thanks in advance.

Regards,
Sateesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top