Hi,
I'm having a bit of trouble getting a recordset to return anything when I run a stored procedure through my VBA. I have tried "SET NOCOUNT ON" and there are results when I have a global temptable.
I think this piece of code is where I'm having trouble.
The select is from the last piece of the stored procedure which is dumping data into a temp table. It will work when the table is ##Get_Data_Final and I make sure the stored procedure is the same as well.
Thanks in advance!
I'm having a bit of trouble getting a recordset to return anything when I run a stored procedure through my VBA. I have tried "SET NOCOUNT ON" and there are results when I have a global temptable.
I think this piece of code is where I'm having trouble.
Code:
Set adoRs = New adoDb.Recordset
With adoRs
Set .ActiveConnection = adoCn
.LockType = adLockOptimistic
.CursorLocation = adUseServer
.CursorType = adOpenForwardOnly
.Open "SET NOCOUNT ON"
End With
adoRs.Open ("SELECT * FROM #Get_Data_Final")
The select is from the last piece of the stored procedure which is dumping data into a temp table. It will work when the table is ##Get_Data_Final and I make sure the stored procedure is the same as well.
Thanks in advance!