Microsoft KB Archive/296771

= &quot;Unspecified error&quot; With MSDAORA Provider =

Article ID: 296771

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.6 Service Pack 1
 * Microsoft OLE DB Provider for Oracle Server 1.0

-



This article was previously published under Q296771



SYMPTOMS
When you use the Microsoft Oracle OLE DB Provider (MSDAORA) to open an ADO Recordset on a SELECT statement that contains a UNION in a sub-select query, you may receive the following error message:

&quot;Unspecified Error&quot;



RESOLUTION
This problem is fixed in MDAC 2.6 SP2 and all later versions of MDAC. 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 MDAC 2.6 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:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

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       Version       Size     File name     Platform --- 04/20/2001 2.61.7420.0   229,648  Msdaora.dll      x86



WORKAROUND
Either apply this hotfix, or do not use a UNION query in a sub-select.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
To reproduce the error, run the following Microsoft Visual Basic code:

NOTE: To run this code you must have both the Oracle client from Oracle Corporation installed and MDAC 2.6 installed.

Sub ORACLE_UNION_TEST Dim conn As ADODB.Connection Dim rs As ADODB.recordset

Set conn = New ADODB.Connection Set rs = New ADODB.recordset conn.Open &quot;Provider=MSDAORA;Data Source=ORACLESERVER;&quot; & _ &quot;User ID=User1;Password=Password1;&quot; On Error Resume Next conn.Execute &quot;DROP TABLE TABLE1&quot; conn.Execute &quot;DROP TABLE TABLE2&quot; On Error GoTo 0 conn.Execute &quot;CREATE TABLE TABLE1(T1C1 NUMBER,T1C2 NUMBER)&quot; conn.Execute &quot;CREATE TABLE TABLE2(T2C1 NUMBER,T2C2 NUMBER)&quot; conn.Execute &quot;INSERT INTO TABLE1 VALUES(7,7)&quot; conn.Execute &quot;INSERT INTO TABLE1 VALUES(6,6)&quot; conn.Execute &quot;INSERT INTO TABLE2 VALUES(6,7)&quot; rs.CursorLocation = adUseClient ' Error will occur here on recordset open. rs.Open &quot;SELECT T1C1, T1C2 FROM TABLE1 &quot; & _ &quot;WHERE T1C1 IN &quot; & _ &quot;(SELECT T2C1 FROM TABLE2 UNION SELECT T2C2 FROM TABLE2)&quot;, _ conn, adOpenStatic, adLockOptimistic

rs.Close Set rs = Nothing conn.Close Set conn = Nothing End Sub

Keywords: kbfix kbqfe kbprb kbhotfixserver KB296771

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.