Hello, I am having difficulties with table variables in SQL2000. I have a stored procedures that select * from @tableTmp at the end of the script. Now, suppose I pass this table variable back to vb's recordset. Unfortunately, it said the object or variable is close when I try to use it in VB. Any solutions on how to pass table variable back to VB? thanks in advance.
'strSQL = "EXEC sp_getCustIDChanged"
With rs
.CursorType = adOpenForwardOnly
.CursorLocation = adUseClient
.Open strSQL, conn, adOpenForwardOnly, adLockOptimistic
End With
MsgBox rs.RecordCount '<--------- Error generated here
'strSQL = "EXEC sp_getCustIDChanged"
With rs
.CursorType = adOpenForwardOnly
.CursorLocation = adUseClient
.Open strSQL, conn, adOpenForwardOnly, adLockOptimistic
End With
MsgBox rs.RecordCount '<--------- Error generated here