View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mary Mary is offline
external usenet poster
 
Posts: 190
Default Returning a resultset from Oracle Stored Procedure using ADO (VBA)

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