Microsoft KB Archive/280685

= FIX: Preparing a Statement That References a Missing Object Incorrectly Succeeds =

Article ID: 280685

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q280685



BUG #: 57785 (SQLBUG_70)



SYMPTOMS
When you use the SQLPrepare function to prepare a statement that references a non-existent object, SQL_SUCCESS is incorrectly returned.

When you first try to prepare the statement, you receive the following 208 error of severity 16 on the server, but SQL_SUCCESS is returned to the client.

Invalid object name '%.*ls'.

When you try to prepare the statement again, no errors are raised to the server or the client. Because this error is not reported to the client, the ODBC driver may report the following error:

[HY010][Microsoft][ODBC Driver Manager] Function sequence error (0)



CAUSE
This problem occurs because, when you try to prepare a query that references a non-existent object, it does not return the original 208 error to the client. Additionally, after you prepare a statement that references a missing object, no future attempts to prepare the statement report the missing object.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

Keywords: kbbug kbfix KB280685

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.