This article was previously published under Q218967
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 54138 (SQLBUG_70)
When you use the ODBC driver Sqlsrv32.dll file version 3.70.0623, if you send a batch to Microsoft SQL Server that contains a "CREATE INDEX" in any form (even commented out) and a SELECT statement follows it with an ORDER BY clause, which includes the optional ASC or DESC keyword, then the ASC or DESC keyword is removed from the query by the ODBC driver when it is sent to the server. The ASC or DESC keyword is replaced with spaces and the query does not function as it was written.
With the noted ODBC driver and an ODBC application, this bug can be seen with SQL Server 6.5 and 7.0.
Microsoft has confirmed that this is a problem in Microsoft SQL Server version 6.5. This problem was first corrected in SQL Server 7.0 Service Pack 1. To resolve this problem, obtain the latest service pack for SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack
For more information, contact your primary support provider.