larrydavid
Programmer
Hello,
I have the following sub which executes a stored proc which runs great in SQL Server (2008) QA:
Private Sub StoredProcedureTest()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=SQLOLEDB;Data Source=TESTSERVER;Initial Catalog=TEST;Trusted_Connection=Yes"
cnn.Open
Set rs = New ADODB.Recordset
Set rs = cnn.Execute("EXEC udsp_Insert_Test_Records")
Debug.Print rs(0), rs(1), rs(2)
rs.Close
Set rs = Nothing
cnn.Close
Set cnn = Nothing
End Sub
But, now I am getting:
Run-time error '3265':
Item cannot be found in the collection corresponding to the requested name or ordinal.
I have been researching this and cannot seem to find a definitive reason for this error, especially since I can execute this sp fine in the SQL QA.
Any help greatly appreciated as always.
Thanks,
Larry
I have the following sub which executes a stored proc which runs great in SQL Server (2008) QA:
Private Sub StoredProcedureTest()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=SQLOLEDB;Data Source=TESTSERVER;Initial Catalog=TEST;Trusted_Connection=Yes"
cnn.Open
Set rs = New ADODB.Recordset
Set rs = cnn.Execute("EXEC udsp_Insert_Test_Records")
Debug.Print rs(0), rs(1), rs(2)
rs.Close
Set rs = Nothing
cnn.Close
Set cnn = Nothing
End Sub
But, now I am getting:
Run-time error '3265':
Item cannot be found in the collection corresponding to the requested name or ordinal.
I have been researching this and cannot seem to find a definitive reason for this error, especially since I can execute this sp fine in the SQL QA.
Any help greatly appreciated as always.
Thanks,
Larry