A large part of the learning program needs to be connected to the database for operation. Here is the error. The editor of the new technology channel cannot return the record set in the storage process using OLEDB. Interested friends will go to the following article to learn more!
Why can't the record set be returned in OLEDB method in stored procedures?
I once wrote a program that operates on temporary tables (the main function is to retrieve the top 10 records of each category).
This stored procedure is normal when connecting to the database using ODBC, and can get the correct results. However, when connecting using the oledb method, the record set cannot be returned, and an error message appears when the operation returns to the record set:
ADODB.Recordset error '800a0e78'
The operation requested by the application is not allowed if the object is closed.
It made me puzzled. why is that?
This is because there is a difference between OLEDB and ODBC, that is, when ASP fetches a record set from ODBC, ODBC filters the create table
or insert into generates some record set that only takes up a position but cannot perform any operation. When the ASP fetches the record set to OLEDB, OLEDB and
These record sets are not filtered out. Therefore, we should execute set nocount on before we do not want to return the record set in the stored procedure.
The stored procedure is prohibited from returning the record set; and when returning the record set, you must first execute set nocount off. In this way, the problem will be solved.
The editor of the 文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文文�