BUG: SQLStatistics Always Reports Indexes as Ascending

Last reviewed: September 9, 1996
Article ID: Q132236
The information in this article applies to:
  • Microsoft Open Database Connectivity, version 2.0

BUG# QJet: 2274 (2.00.2317)

SYMPTOMS

The SQLStatistics function always returns the type of an index as ascending even if it is created as a descending index.

STATUS

Microsoft has confirmed this to be a problem in 16-bit and 32-bit ODBC version 2.0 Access, FoxPro, and dBase drivers. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

You can specify an index either as ascending or descending using the ODBC SQL grammar. The syntax is:

   CREATE [UNIQUE] INDEX index-name ON base-table-name
   (column-identifier [ASC | DESC]  [,column-identifier [ASC | DESC]...)

SQLStatistics is an ODBC API function that retrieves a list of statistics about a single table and the indexes associated with the table. It returns the information as a result set whose seventh column is the index type. It returns "A" for ascending and "D" for descending index types. However, the dBase, Access, and FoxPro drivers return "A" for the index type when the index is created as descending.


Additional reference words: 2.00 2.00.2317 desktop drivers
KBCategory: kbother kbbug2.00.2317
KBSubcategory:



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: September 9, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.