BUG: DBCOUNT() Returns Zero for sp_sqlexec

Last reviewed: April 29, 1997
Article ID: Q113851

The information in this article applies to:
  • Microsoft SQL Server, version 4.2
BUG# NT: 744 (4.2)

SYMPTOMS

When running a query against a remote server using the sp_sqlexec remote procedure, a message indicating that zero rows were affected is displayed by the front end. If the same query is run directly against the remote server, the front end displays the number of rows affected by the last statement in the query.

CAUSE

The DB-Library (DB-Lib) DBCOUNT() function returns zero for queries executed using the sp_sqlexec remote stored procedure.

WORKAROUND

Remote execution of a user-defined stored procedure containing the desired query will allow the front end to determine the number of rows affected. If this data is needed by the front end, stored procedures should be created to execute the desired SQL statements instead of executing them in an ad- hoc fashion using sp_sqlexec.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 4.2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: rpc Windows NT dblib
Keywords : kbbug4.20 kbprg SSrvDB_Lib SSrvWinNT
Version : 4.2
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.