FIX: Jet 4.0 Creates Incorrect CREATE TABLE Statements (250637)
The information in this article applies to:
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Access 2000
- Microsoft Access 2002
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.
STATUSMicrosoft 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.
REFERENCES
To upgrade to the latest Jet 4.0 service pack, see the following Microsoft Knowledge Base article:
239114 How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine
Modification Type: | Major | Last Reviewed: | 4/7/2006 |
---|
Keywords: | kbQFE KBHotfixServer kbBug kbDatabase kbfix kbJET kbMDAC210SP2fix KB250637 |
---|
|