Error connecting to SQL Server - Connection is busy with results for another command
'Connection is busy with results for another command ' error received when executing a COBOL application where the program tries to connect to an SQL Server database.
This SQL Server error message is thrown when there are multiple connections going to the same database, through the same connection driver e.g. ODBC.
The error is not specific to the COBOL language and can be resolved by enabling the MARS (multiple active results sets) SQL directive.
This can be set at a database level and/or in the SQL COBOL compilation directives by specifying SQL(MARS).