This article was previously published under Q280685
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57785 (SQLBUG_70)
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)
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.
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.