The information in this article applies to:
SYMPTOMSThe following run-time errors may occur when attempting to Update/Delete data with an ActiveX Data Objects (ADO) Server side cursor: -or- The MSDASQL provider generates the former error message and the SQLOLEDB provider generates the latter. NOTE: Although the error message occurs, the Update/Delete succeeds. CAUSEThe SQLServer is using the following configuration options:
RESOLUTIONChange the cursor location to adUseClient or trap the run-time error in Visual Basic. Since the Update/Delete actually succeeds, you can ignore the error message. STATUSThis behavior is by design. MORE INFORMATION
When SET NOCOUNT ON is configured for the server with <sp_configure "useroptions", 512> the @@ROWCOUNT value is reset.
The following statement is from the Transact SQL Help regarding @@ROWCOUNT:
SET NOCOUNT ON suppresses DONE_IN_PROC messages, and by default, @@ROWCOUNT
is reset by any statement not returning row count messages. The result is
an error message generated by the provider that depends on the @@ROWCOUNT
value for rows affected.
An error message results although the Update/Delete transaction actually succeeds. A SQL Trace indicates that <sp_cursor> is called for a Server side cursor and a SQL <Update> statement (QBU) for the Client side cursor. Steps to Reproduce BehaviorWARNING: The following code changes SQL Server global configuration settings and may impact triggers as well as stored procedures and should be executed with caution.
© Microsoft Corporation 1999, All Rights Reserved. REFERENCESFor additional information, please see the following article in the Microsoft Knowledge Base: Q195225 PRB: DAO Runtime Error 3146 When Modifying SQLServer DataTransact - SQL Reference Help, search on: "sp_configure" Transact - SQL Reference Help, search on: "SET" Additional query words:
Keywords : kbADO150 kbADO200 kbDatabase kbODBC kbSQLServ kbGrpVBDB kbGrpMDAC kbDSupport kbADO210sp2 |
Last Reviewed: November 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |