bug in cuff snippet
JimF
Posts: 49 Bronze 3
I just tried the cuff snippet today and I think I found a bug.
@FETCH_STATUS <> 0). Try this:
/* declare variables */ DECLARE @variable INT DECLARE $cursor_name$ CURSOR FAST_FORWARD READ_ONLY FOR $select_statement$ OPEN $cursor_name$ FETCH NEXT FROM $cursor_name$ INTO @variable WHILE @@FETCH_STATUS = 0 BEGIN FETCH NEXT FROM $cursor_name$ INTO @variable $CURSOR$ END CLOSE $cursor_name$ DEALLOCATE $cursor_name$
@FETCH_STATUS <> 0). Try this:
/* declare variables */ DECLARE @variable INT DECLARE $cursor_name$ CURSOR FAST_FORWARD READ_ONLY FOR $select_statement$ OPEN $cursor_name$ FETCH NEXT FROM $cursor_name$ INTO @variable WHILE @@FETCH_STATUS = 0 BEGIN $CURSOR$ FETCH NEXT FROM $cursor_name$ INTO @variable END CLOSE $cursor_name$ DEALLOCATE $cursor_name$
Comments
Thanks for posting. You’re absolutely right and moving the $CURSOR$ placeholder as you suggested will fix the issue. We’ll make this change to the default 'curff' snippet in the product for future releases.
Thanks
Ali
Thanks for letting us know this is still an issue. We made the fix when the issue was first reported but this change was overwritten during the subsequent overhaul of the snippets manager. We’ll fix the default snippet again and it’ll be in the next release.
Thanks
Ali
You can get the latest build by using Check for Updates or by downloading it from here.
Thanks
Ali