VS2010 MFC +win7 Program under Win7 normal operation, Server2008 error (ADO database connection error)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.