Microsoft KB Archive/250637

= FIX: Jet 4.0 Creates Incorrect CREATE TABLE Statements =

Article ID: 250637

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Access 2000 Standard Edition
 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q250637



SYMPTOMS
Incorrect CREATE TABLE statements are created when Microsoft Jet database engine 4.0 exports tables through ODBC drivers that do not require identifier quote characters.

If an ODBC trace is generated, a you see a statement similar to the following:

CREATE TABLE (integer, varchar(40), varchar(20), double, smallint, smallint)

Notice that the table name and all of the field names are missing, which causes failures in the backend database.

This can be reproduced with any product or technology that uses Jet 4.0, such as Access 2000 and DAO 3.6.



CAUSE
By default, Jet encloses table and field names in quote characters when constructing the SQL statement. An error in Jet's parsing logic is leaving out the table and field names when using an ODBC driver that does not require identifier quote characters.

To determine if a certain ODBC driver supports identifier quote characters, use the ODBC API SQLGetInfo with the type SQL_IDENTIFIER_QUOTE_CHAR. A blank is returned if the driver does not support this.



RESOLUTION
To resolve this problem, install Jet hotfix version 4.0.3515 or upgrade to the latest Jet 4.0 service pack.



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 Jet 4.0 Service Pack 4.



MORE INFORMATION
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 Jet 4.0 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/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 typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Manual Installation
Please carefully follow the instructions outlined in the Readme.txt file that is provided in the hotfix package. A breakdown of the Jet components is provided, along with installation instructions for each.

