ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Returning a resultset from Oracle Stored Procedure using ADO (VBA) (https://www.excelbanter.com/excel-programming/349200-returning-resultset-oracle-stored-procedure-using-ado-vba.html)

Mary

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



All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com