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: Acc2000: "Not a Valid Alias" Jet 3068 Error Message


View products that this article applies to.

This article was previously published under Q244125

↑ Back to the top


Symptoms

When you run a SQL query containing more than 22 UNION statements using Microsoft Jet 4.0 the following error appears:
Not a valid alias name.
The same query worked without error when using Microsoft Jet 3.x.

↑ Back to the top


Cause

This problem is caused by a bug in the underlying Microsoft Jet 4.0 database engine that is included with the Microsoft Data Access Components (MDAC) versions noted in the earlier. As a result of this bug Microsoft Jet 4.0 is unable to execute queries containing more than 22 UNION statements.

↑ Back to the top


Resolution

To resolve this problem, download and install the latest Jet 4.0 service pack. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
239114� How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine

↑ Back to the top


Status

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

Note The Microsoft Jet Engine does not ship with MDAC 2.6.

This problem was corrected in Jet 4.0 SP 5.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Install MDAC 2.1 SP2 on a test computer.
  2. Create an ODBC DSN to the NorthWind.mdb sample database called NorthWind.
  3. Run the following VBA code. NOTE: The VBA project requires a reference to the "Microsoft ActiveX Data Objects 2.1 Library.":
    Sub TestUNIONError()
    Dim conn As New ADODB.Connection
    Dim sql As String
    Dim i As Long
    
        conn.Open "NorthWind"
        For i = 1 To 22
            sql = sql & "select * from shippers UNION "
        Next i
        sql = sql & "select * from shippers"
        conn.Execute sql
        conn.Close
    
    End Sub
    					
  4. Run the application. It results in the following error message:
    Run-time error '-2147467259 (80004005)'.
    [Microsoft][ODBC Microsoft Access Driver] Not a valid alias name.

↑ Back to the top


Keywords: kbqfe, kbhotfixserver, kbbug, kbdatabase, kbfix, kbjet, KB244125

↑ Back to the top

Article Info
Article ID : 244125
Revision : 5
Created on : 4/7/2006
Published on : 4/7/2006
Exists online : False
Views : 464