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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.