programmher
Programmer
I am still working web-enabling pre-existing stored procedures. My latest dilemna involves cursors and fetch commands. Below is an example of the snippet of code:
OPEN cursorOne
FETCH NEXT FROM cursorOne INTO @var1 , @var2,
@var3, @var4, @var5, @var6
WHILE (@@FETCH_STATUS <> -1)
BEGIN
IF (@@FETCH_STATUS <> -2 )
BEGIN
I am not sure: 1. what this is doing; 2. If I should re-write it with CF; 3. How to rewrite it in CF.
I think the original programmer was differentiating this cursor from the dataset from the previous stored procedure (which calls this stored procedure). If that is the case, couldn't I just use an array or just set cursorOne to a variable and reference the returned variables in the array?
Can anyone give shed some light?
OPEN cursorOne
FETCH NEXT FROM cursorOne INTO @var1 , @var2,
@var3, @var4, @var5, @var6
WHILE (@@FETCH_STATUS <> -1)
BEGIN
IF (@@FETCH_STATUS <> -2 )
BEGIN
I am not sure: 1. what this is doing; 2. If I should re-write it with CF; 3. How to rewrite it in CF.
I think the original programmer was differentiating this cursor from the dataset from the previous stored procedure (which calls this stored procedure). If that is the case, couldn't I just use an array or just set cursorOne to a variable and reference the returned variables in the array?
Can anyone give shed some light?