DAO问题:Unrecognized database format

If you are linking with the MFC DLL, you can specify that you want MFC to use DAO 3.6 by inserting the following line of code before you open an Access 2000 database:

AfxGetModuleState()->m_dwVersion = 0x0601;


Insert this line in the CYourApp::Initinstance() function of your program.

If you are building with the static MFC libraries, following are the steps to get static builds of MFC to use DAO 3.6:
1. Modify the Daocore.cpp file in the MFC SRC directory. You will receive the following comment:

// Determine whether to use DAO 3.6, 3.5, or 3.0
// Use DAO 3.0 if DLL build and not built with MFC 4.21 or later
// Use DAO 3.6 if MFC 6.01 or later
// otherwise, DAO 3.5



Add the following lines:

#undef _MFC_VER
#define _MFC_VER 0x0601



2. Rebuild the library for the variant you need. For example, to build the static MFC library, debug version, non-Unicode, with no browser files use the following command at the command prompt in the MFC/SRC folder:

nmake DEBUG=1


for release:
nmake DEBUG=0


for unicode builds:
nmake DEBUG=1 UNICODE=1
nmake DEBUG=0 UNICODE=1
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值