VC连接ACCESS数据库出现的问题


1>------ Build started: Project: CallRecord, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(297) : error C2011: 'LockTypeEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(109) : see declaration of 'LockTypeEnum'
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(345) : error C2011: 'DataTypeEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(138) : see declaration of 'DataTypeEnum'
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(390) : error C2011: 'FieldAttributeEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(127) : see declaration of 'FieldAttributeEnum'
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(412) : error C2011: 'EditModeEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(83) : see declaration of 'EditModeEnum'
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(421) : error C2011: 'RecordStatusEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(341) : see declaration of 'RecordStatusEnum'
1>e:\vc_code\commassist\callrecord\debug\msado15.tlh(685) : error C2011: 'ParameterDirectionEnum' : 'enum' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\dbdaoint.h(326) : see declaration of 'ParameterDirectionEnum'
1>Build log was saved at "file://e:\vc_code\commassist\CallRecord\Debug\BuildLog.htm"
1>CallRecord - 6 error(s), 0 warning(s)


解决:

在 stdafx.h中 添加:

#import "C:/Program Files/Common Files/System/ado/msado15.dll"no_namespace \
rename("EOF","adoEOF") rename("DataTypeEnum","adoDataTypeEnum")\
rename("FieldAttributeEnum", "adoFielAttributeEnum") rename("EditModeEnum", "adoEditModeEnum") \
rename("LockTypeEnum", "adoLockTypeEnum") rename("RecordStatusEnum", "adoRecordStatusEnum")\
rename("ParameterDirectionEnum", "adoParameterDirectionEnum")

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值