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, networking, learning, and sharing knowledge.