A solution that an ADO application cannot run on another operating system
My machine is WIN7 system, in WIN7 under the development of MFC ADO application to SERVER2008 can not run.
The solution is as follows:
1. Download the following file first
32-bit WIN7 system: msado60_backcompat_i386.tlb
64-bit WIN7 system (Intel platform): Msado60_backcompat_i386.tlb and Msado60_backcompat_x64.tlb
64-bit WIN7 system (AMD platform): Msado60_backcompat_i386.tlb and Msado60_backcompat_ia64.tlb
2. Take 32-bit System example
Register Msado60_backcompat_i386.tlb
1. Copy the msado60_backcompat_x64.tlb to the C:\Program Files\Common Files\system\ado\ Directory
2, then copy the C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe to the C:\Program Files\Common Files\system\ado\ Directory
3, run cmd,
Enter separately:
pushd C:\Program Files\Common Files\system\ado\ Enter
Regtlibv12.exe Msado60_backcompat_x64.tlb Enter
Register Msado60_backcompat_i386.tlb
1. Copy the msado60_backcompat_i386.tlb to the C:\Program Files\Common Files\system\ado\ Directory
2, then copy the C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe to the C:\Program Files\Common Files\system\ado\ Directory
3, run cmd,
Enter separately:
pushd C:\Program Files (x86) \common Files\system\ado\ Enter
Regtlibv12.exe Msado60_backcompat_i386.tlb Enter
Attention:
32-bit systems need to register msado60_backcompat_i386.tlb;
64-bit WIN7 system (Intel platform) need to register: Msado60_backcompat_i386.tlb and msado60_backcompat_x64.tlb these 2 files;
64-bit WIN7 system (AMD platform) need to register: Msado60_backcompat_i386.tlb and msado60_backcompat_ia64.tlb these 2 files;
3. Replace the program code
If it is VC + +
Will:
#import "Msado15.dll" no_namespace rename ("EOF", "Endoffile")
To be replaced by:
#import "msado60_backcompat.tlb" no_namespace rename ("EOF", "Endoffile")
4. Rebuild the solution to
VS2010 MFC +win7 Program under Win7 normal operation, Server2008 error (ADO database connection error)