将工程从VC6.0转移到VS2008,在Win7 64位系统上编译成功,正常运行。
发布到Windows Server 2003后,打开Access数据库的Record时始终报“无效指针”
经过一番搜索,有的文章说目标系统需要打KB983264补丁,但这不是我要的解决方案,再经过一番搜索,终于发现一个完美的解决方法:
下载msado60_Backcompat_i386.tlb到项目中
下载地址:[url]http://download.microsoft.com/download/6/4/3/64318ED2-7E18-4A5C-80E2-9BDA0DF02DB3/msado60_Backcompat_i386.tlb[/url]
将原来程序中的类似于下面的代码:
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")\
rename("LockTypeEnum","adoLockTypeEnum")\
rename("FieldAttributeEnum","adoFieldAtttributeEnum")\
rename("EditModeEnum","adoEditModeEnum")\
rename("RecordStatusEnum","adoRecordStatusEnum")\
rename("ParameterDirectionEnum","adoParameterDirectionEnum")\
rename("DataTypeEnum","adoDataTypeEnum")
替换成:
#import "msado60_Backcompat_i386.tlb" no_namespace rename("EOF","adoEOF")\
rename("LockTypeEnum","adoLockTypeEnum")\
rename("FieldAttributeEnum","adoFieldAtttributeEnum")\
rename("EditModeEnum","adoEditModeEnum")\
rename("RecordStatusEnum","adoRecordStatusEnum")\
rename("ParameterDirectionEnum","adoParameterDirectionEnum")\
rename("DataTypeEnum","adoDataTypeEnum")
重新编译后正常运行。
参考文章:[url]http://blog.csdn.net/jay329106193/article/details/8106204[/url]
发布到Windows Server 2003后,打开Access数据库的Record时始终报“无效指针”
经过一番搜索,有的文章说目标系统需要打KB983264补丁,但这不是我要的解决方案,再经过一番搜索,终于发现一个完美的解决方法:
下载msado60_Backcompat_i386.tlb到项目中
下载地址:[url]http://download.microsoft.com/download/6/4/3/64318ED2-7E18-4A5C-80E2-9BDA0DF02DB3/msado60_Backcompat_i386.tlb[/url]
将原来程序中的类似于下面的代码:
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")\
rename("LockTypeEnum","adoLockTypeEnum")\
rename("FieldAttributeEnum","adoFieldAtttributeEnum")\
rename("EditModeEnum","adoEditModeEnum")\
rename("RecordStatusEnum","adoRecordStatusEnum")\
rename("ParameterDirectionEnum","adoParameterDirectionEnum")\
rename("DataTypeEnum","adoDataTypeEnum")
替换成:
#import "msado60_Backcompat_i386.tlb" no_namespace rename("EOF","adoEOF")\
rename("LockTypeEnum","adoLockTypeEnum")\
rename("FieldAttributeEnum","adoFieldAtttributeEnum")\
rename("EditModeEnum","adoEditModeEnum")\
rename("RecordStatusEnum","adoRecordStatusEnum")\
rename("ParameterDirectionEnum","adoParameterDirectionEnum")\
rename("DataTypeEnum","adoDataTypeEnum")
重新编译后正常运行。
参考文章:[url]http://blog.csdn.net/jay329106193/article/details/8106204[/url]