Hi,
These are the opening lines of my code
USE myDatabase
GO
PRINT '@@FETCH_STATUS: ' + CAST(@@FETCH_STATUS AS nvarchar(30))
This returns FETCH_STATUS as -1. I have just opened the connection. Can anyone tell me why this is occuring?
Hi,
These are the opening lines of my code
USE myDatabase
GO
PRINT '@@FETCH_STATUS: ' + CAST(@@FETCH_STATUS AS nvarchar(30))
This returns FETCH_STATUS as -1. I have just opened the connection. Can anyone tell me why this is occuring?
@@Fetch_Status Returns the status of the last cursor FETCH statement issued against any cursor currently opened by the connection.
Since you have not opened a Cursor yet , its giving -1 as a value.
check this msdn article for more details
http://msdn.microsoft.com/en-us/library/ms187308.aspx
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.