I'm developing a Visual C++ database application which will be
delivered to customers. Some customers install Access 97 on their
computers, others install Acess 2000 or higher versions.
In my application, I need to create a MDB file, according to the
Access version installed on the customers' computers so that they can
use Access to open the created MDB file without errors such as
"Unrecognized file format".
More specificly, my application will call DAO 3.5 to create a Jet 3.0
MDB file if it detects an Access 97 is installed on the customer's
computer. Otherwise, it will call DAO 3.6 to create a Jet 4.0 MDB file
for Access 2000 or higher versions.
I'm using CDaoDatabase, CDataRecordset to operate the MDB databases
and the MFC library is linked staticlly. I try to browse MSDN but it
seems that the only way to invoke Dao 3.6 is to modify the definition
of MFC_VERSION:
#undef _MFC_VER
#define _MFC_VER 0x0601
and rebuild the MFC library. But in that case, my application will use
DAO 3.6 staticlly and can not call DAO 3.5 if only Access 97 is
installed on the customers' computers.
Can anyone help me?