November 26, 2001 at 5:17 am
With the line of code:
DECLARE MyCursor CURSOR SCROLL DYNAMIC FOR
SELECT....
I'm getting a error message: the variable MyCursor does not currently have a cursor allocated to it.
Can anyone help?
DavidFC
November 26, 2001 at 5:50 am
SQL Server raises this error if a referenced cursor variable exists but does not have a cursor currently allocated to it - have seen this if you are opening the cursor before trying to fetch - is this your case?
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
November 26, 2001 at 6:21 am
Paul, Yes I am, i.e.
OPEN MyCursor
FETCH NEXT FROM MyCursor INTO @warehouse.
Do I need to swop these lines around
DavidFC
November 26, 2001 at 7:17 am
Sorry David, I copied and pasted my comments incorrectly - should have said "if you are not opening the cursor before ...". As long as there are no 'Close MyCursor' commands inbetween the open and fetch, your code looks ok and I'm stuck.
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply