Microsoft Knowledge Base Email Alertz

(831801) - When you connect to Microsoft SQL Server 2000 or to Microsoft SQL Server 7.0, and you call the SQLStatistics ODBC function, you may notice that the collation is always returned as A regardless of the sort order sequence. You may also notice this...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 831801 - Last Review: November 5, 2007 - Revision: 4.2

FIX: SQLStatistics function returns incorrect sort order sequence

SYMPTOMS

When you connect to Microsoft SQL Server 2000 or to Microsoft SQL Server 7.0, and you call the SQLStatistics ODBC function, you may notice that the collation is always returned as "A" regardless of the sort order sequence.

You may also notice this behavior when you run the sp_statistics system stored procedure.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date      Time   Version      Size   File name
   ----------------------------------------------
   20-Nov-2003  01:01                    937,168  Instcat.sql
   04-Dec-2003  01:34                      1,228  Readme.txt

Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the behavior

  1. Start SQL Query Analyzer.
  2. Connect to the pubs database of SQL Server.
  3. Run the following Transact-SQL statement:
     
    CREATE TABLE [dbo].[IndexJDE1] ( 
     
     [Col1] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 
     
     [Col2] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 
     
     [Col3] [int] NOT NULL 
     
     ) ON [PRIMARY] 
     
     GO
    
    CREATE INDEX [IX_IndexJDE1] ON [dbo].[IndexJDE1]([Col1], [Col2]) ON [PRIMARY]
    GO
    
    CREATE INDEX [IX_IndexJDE1_1] ON [dbo].[IndexJDE1]([Col2] DESC , [Col3]) ON [PRIMARY]
    GO
    
    CREATE INDEX [IX_IndexJDE1_2] ON [dbo].[IndexJDE1]([Col1] DESC ) ON [PRIMARY]
    GO
    
    CREATE INDEX [IX_IndexJDE1_3] ON [dbo].[IndexJDE1]([Col2], [Col3], [Col1]) ON [PRIMARY]
    GO
  4. Start the ODBC Test tool.
  5. Connect to the pubs database of the SQL Server and then run the SQLStatistics function for the IndexJDE1 table that is created in Step 3.

    You may notice that collation "A" is returned for all the indexes.

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://kbalertz.com/Feedback.aspx?kbNumber=824684/ ) Description of the standard terminology that is used to describe Microsoft software updates
For additional information about the ODBC Test, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms712676.aspx (http://msdn2.microsoft.com/en-us/library/ms712676.aspx)

APPLIES TO
  • Microsoft Data Access Components 2.7
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft ODBC Driver for Microsoft SQL Server 3.7
Keywords: 
kbqfe kbhotfixserver kbbug kbfix KB831801
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate