Getting error "Error 3704 operation is not allowed when the object is closed vb6" using ADODB with Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL).

Sankaranarayanan M 1 Reputation point
2022-07-29T05:35:37.967+00:00

Currently, We using Visual Basic 6.0

For Database connection, we are using ADODB connectivity through the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL).

I am getting this error "Error 3704 operation is not allowed when the object is closed vb6"

In this website (https://dacosta9.wordpress.com/2017/10/13/run-time-error-3704-operation-is-not-allowed-when-the-object-is-closed/#:~:text=by%20John%20DaCosta-,Run%2Dtime%20error%20'3704'%20Operation%20is%20not%20allowed,when%20the%20object%20is%20closed&text=13%201%20Minute-,Run%2Dtime%20error%20'3704'%20Operation%20is%20not%20allowed%20when,intermediary%20%E2%80%9Crows%20affected%E2%80%9D%20messages)

They have given solution to use SET NOCOUNT ON in the stored procedure or in the SQL statement used with ADO

I have tried in one SP above mention solution is working.

Since we have multiple SP's, is there any solution other than the above mentioned one?

Community Center Not monitored
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.