![]() |
Use Temp Table Variable in Stored Procedure
I'm playing with simple stored procedure with declared table variable as below:
Code:
CREATE PROCEDURE TESTI use the following codes to do this: Code:
Set cmd = CreateObject("ADODB.Command")Is there any issue I need to take care of? It seems to have something to do with the table variable? |
Answering my own question and for others who might benefit:
This is what I need to do, I added "SET NOCOUNT ON" in the beginning of the stored procedure to send back a closed recordset. |
solution
I wrote a post about this a while ago - you essentially need to form the sql statement first by declaring a long varchar and then executing it.
http://www.geakeit.co.uk/2011/02/05/a-table-input-variable-in-a-stored-procedure-and-bypassing-must-declare-the-table-variable-msg-1087/ |
| All times are GMT -4. The time now is 04:21 AM. |
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.