以下代码在此存储过程上不起作用。它适用于查询和另一个存储过程。
它将不会找到此存储过程的值,并返回错误"Item be debug.print in the collection in the collection for the requested or ordinal“
Dim x As ADODB.Connection
Set x = New ADODB.Connection
x.ConnectionString = "Provider=a;Server=b;Database=c;Trusted_Connection=yes;"
x.Open
Dim y As ADODB.Recordset
Set y = New ADODB.Recordset
x.CommandTimeout = 0
Set y = x.Execute("exec SP_storedprocedure 0")
Debug.Print y(0), y(1), y(2), y(3)**--the problem is here**
y.Close
Set y = Nothing
x.Close
Set x = Nothing
https://stackoverflow.com/questions/24620324
复制相似问题