Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: MDAC 2.6 SQLOLEDB Provider Running on Windows 2000 Returns No Error Text Description


View products that this article applies to.

This article was previously published under Q279760

↑ Back to the top


Symptoms

Installing Microsoft Data Access Components MDAC 2.6 RTM on Windows 2000 or Windows NT 4.0 Professional, Server, or Advanced Server-based computers prevents error text description from being returned from the Microsoft OLE DB Provider for SQL Server (SQLOLEDB). The Microsoft OLE DB Provider for ODBC (MSDASQL) is not affected.

↑ Back to the top


Cause

Localization issues cause this bug. If the system locale settings are not set to match the user locale setting for non-United States locale settings, the SQLOLEDB Provider returns an error when it encounters one, but the description text associated with the error is not returned.

↑ Back to the top


Resolution

To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
300635� INFO: How to Obtain the Latest MDAC 2.6 Service Pack
To resolve this problem, you can also follow these steps:
  1. On Control Panel, click Regional Options.
  2. Change settings for the current user to the locale for your particular country.
  3. Click Set Default, and then change the system locale to the locale for your particular country.

WORKAROUND

Although the error description is not raised to the correct objects, you can use the following workaround to retrieve it:
  • OLE DB API programmers can specify GetSystemDefaultLCID() for the LCID parameter in the IErrorRecords::GetErrorInfo call.
  • OLEDB Templates programmers can specify GetSystemDefaultLCID() for the LCID parameter in the CDBErrorInfo::GetAllErrorInfo call.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Download the Microsoft MDAC 2.6 RTM components from the following Microsoft Web site:
  2. Install the downloaded package on a Windows 2000 Professional, Server, or Advanced Server-based computer.
  3. On Control Panel, click Regional Options.
  4. Change settings for the current user to locale of country - not English (United States).
  5. Click Set Default, and then change the system locale to English (United States).
  6. Create a Visual Basic application that contains the following code:
    Private Sub Form_Load()
     On Error GoTo ErrHandler
     Dim str As String
       Dim cn As ADODB.Connection
       Set cn = New ADODB.Connection
       With cn
          .ConnectionString = "Provider=SQLOLEDB;Data Source=Server;Initial Catalog=non-existant db;Integrated Security= SSPI"
          .Open
       End With
       Set cn = Nothing
       Exit Sub
    
    ErrHandler:
       MsgBox "Error Number: " & cn.Errors(0).Number & "  Error Message: " & cn.Errors(0).Description
    End Sub
    					
  7. Note that the message box shows the error number, but not the error description.

↑ Back to the top


References

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
300634� INFO: List of Bugs Fixed in MDAC 2.6 Service Pack 1

↑ Back to the top


Keywords: KB279760, kbfix, kbbug, kbhotfixserver, kbqfe

↑ Back to the top

Article Info
Article ID : 279760
Revision : 9
Created on : 2/12/2007
Published on : 2/12/2007
Exists online : False
Views : 541