Returning a resultset from Oracle Stored Procedure using ADO (VBA)

M

mary

I am having all kinds of trouble trying to find the correct syntax for
calling an Oracle stored procedure that has 1 input parameter (number) and 1
output parameter (a cursor/resultset) from my VBA code in Excel. The code
below generates an error: "ODBC driver does not support the requested
properties"...if I change the CommandText syntax I get an Oracle syntax
error...

Any help would be appreciated:


Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cn
cmd.CommandType = adCmdText
cmd.CommandText = "{call test_pkg.test_proc(?, {resultset 100})}"

Set paramWeekId = New ADODB.Parameter
paramWeekId.Direction = adParamInput
paramWeekId.Type = adNumeric
paramWeekId.Name = "p_week_id"
paramWeekId.Value = lngWeekId

cmd.Parameters.Append paramWeekId

Set rst = cmd.Execute
 

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