FIX: "SELECT DISTINCT" Statement with Oracle Provider Causes "Invalid Column Name" Errors (238164)



The information in this article applies to:

  • Microsoft OLE DB Provider for Oracle 2.1
  • Microsoft Data Access Components 2.1 SP2

This article was previously published under Q238164

SYMPTOMS

When you are using Microsoft OLE DB provider for Oracle (Msdaora.dll), a SELECT statement containing the DISTINCT keyword causes the BASECOLUMNNAME property of the first field in the recordset to be named "DISTINCT" instead of its real name. If you attempt to update the recordset, the following error is returned:
Run-time error '-2147217900' (80040e14)' ORA-00904: invalid column name
This problem does not occur with Microsoft ODBC Driver for Oracle.

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft Data Access Components service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: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 typical 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 fix should have the following file attributes or later:
   Date      Time    Version      Size    File Name     Platform
   -------------------------------------------------------------
   7/22/99   02.12.4322          184KB    Msdaora.dll


				

If Keyset cursors are not required, use the Microsoft ODBC Driver for Oracle instead of the Oracle native provider. If Keyset cursors are required, use the latest Microsoft OLE DB Provider for Oracle.

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 corrected in MDAC 2.5.

MORE INFORMATION

Manual Installation

  1. Close or stop any applications or services that are using Msdaora.dll, including Internet Information Server (IIS), Microsoft Transaction Server (MTS), and any ADO or OLE DB applications.
  2. Download the hotfix version of Msdaora.dll into a temporary directory.
  3. Locate and rename the current version of Msdaora.dll, which should be in the \Program Files\Common files\System\ole db folder.
  4. Copy the hotfix version of Msdaora.dll into the same location, then and restart your services and applications.

Modification Type:MinorLast Reviewed:10/7/2005
Keywords:kbHotfixServer kbQFE kbBug kbDatabase kbfix kbMDAC250fix kbMDACNoSweep kbOracle kbProvider kbQFE KB238164