问题
Does the following article apply to all uses of JET (including from within client apps via DAO or OLEDB):
http://support.microsoft.com/kb/275058
Does this mean JET 4.0 or above is mandatory for anything involving an Access MDB?
回答1:
Unfortunately, the KB article is worded poorly. The SQL 92 syntax to which they refer is when you add a non-column comparison filter in the ON clause of an OUTER join (which also means it will not be viewable in the QBE). Thus, a standard outer join (LEFT or RIGHT) with standard column comparisons to tables in the query will work just fine in all versions of Jet. It is when you try to add something other than column comparison filter (e.g. [Col] > 200) in the ON clause of an OUTER join that Access does not properly interpret the SQL statement.
I have personally run into this very issue, In short, just because it is standard SQL does not mean that Access will return the proper results. It is one of the many things that many people find frustrating about Access.
ADDITION To answer your last question, no, it is not mandatory to use Jet as the backend storage technology for an application developed with Access. You can create Access solutions that use SQL Server or other database products as the backend database store.
The Wikipedia article on the Jet Engine is actually pretty thorough in describing the differences and features.
回答2:
EDIT: I just reread the KB article, and it says the problem is with Jet 4.0 Service Pack 3 and earlier -- that's a version of Jet that has long, long ago been superseded. There should be no Windows 2000 or later computers anywhere that have Windows Update turned on or that have been updated since c. 2002 that have any version of Jet as old as service pack 3. To check the version of Jet on your computer, find MSJET40.DLL. The build number begins with the service pack number. On this PC, I have version number 4.0.9511.0, so that's SP9.
If you have an MSJET40.DLL with version number 4.0.3XXX.X or earlier, then follow the instructions on getting the service pack, and the problem will be resolved. But I don't believe there's any signficant number of Windows PCs out there that still have Jet 4.0 SP3 or earlier on them. And only PCs that aren't being updated with Windows Update could possibly have it.
ORIGINAL ANSWER: Jet 4.0 was released in 1999 with Access 2000. It was included in in Windows 2000 and is included in every version of Windows since. Because it's an OS component (it is used for interaction with the Active Directory data store, though AD uses the other Jet engine, not the one used by Access). Jet 4.0 is a frozen version of Jet and will not be developed any further by the Windows team (who owns the code for it).
When Access 2007 was released, a new version of the Jet database engine was created, private to the Access development team, and called ACE. It is really Jet 5.0 (or 4.5, depending on how major you consider the enhancements to be), but it introduced a new file format, ACCDB.
The article you cite says it applies to only Access 2002 and Access 2003, but I'd think that since it's a Jet 4.0 issue, it would also apply to Access 2000. Likewise, it would apply to any use of Jet 4.0 from outside Access, e.g., OLEDB or ODBC.
Note that via DAO, you can't encounter the problem, because DAO cannot use SQL 92 compatibility mode. The problem will always occur with OLEDB because the Jet driver for OLEDB always uses SQL 92 mode.
It's not clear to me if the problem is avoided if you use ACE to query an MDB.
回答3:
JET is the database engine used by Access. Or put it another way, Access is an app built on the JET database engine. (Access doesn't have to use JET, it can also connect directly to SQL server.)
When ever you execute queries against an .mdb file, regardless of technology, it is the JET engine that executes the query.
A version of JET is needed to access a .mdb, but wether it has to be 4.0 will depend upon the .MDB file version and whether there are prevalent bugs in earlier versions that you need to avoid. But in general, yes, you should expect to use the latest JET version with an Access MDB.
OUTER JOINs work on older versions - the bug mentioned is only prevalent when there is also a WHERE clause.
来源:https://stackoverflow.com/questions/2749690/jet-sql-do-left-joins-and-right-joins-only-work-under-jet-4-0-and-above