I have a big problem with "set nocount on".
We are running Fujitsu Cobol on Windows with MS SQL Server. All out programs declare cursors inside Cobol. We were told that in order to improve performence we need to declare cursor in Stored Procedure.
One of my programs has one main cursor to get all each customer accoount and for each customer I opened/process/close another cursor to get custorer transactions.
So I moved the main cursor to the Stored Procedure. Now - if the Stored Procedure does NOT includes "set nocount on" - my program runes correctly. When I put "set nocount on" inside the Stored Procedure - on fetch of the cutomer cursor (the one defined in my Cobol program) I am getting SQL error code -999999700 and the message: "The cursor is not opened".
Any ideas why?