ADO 應用程序不在運行級別較低的操做系統運行的解決方案 轉載

個人機子是WIN7系統,在WIN7下開發的MFC ADO應用程序到XP上就不能運行了。

解決方案以下:html

一、先下載下面的文件spa

32位WIN7系統:Msado60_Backcompat_i386.tlbhtm

64位WIN7系統(INTEL平臺):Msado60_Backcompat_i386.tlb 和Msado60_Backcompat_x64.tlbblog

64位WIN7系統(AMD平臺):Msado60_Backcompat_i386.tlbMsado60_Backcompat_ia64.tlb開發

二、拿64位WIN7系統(INTEL CPU)示例get

註冊msado60_Backcompat_x64.tlbimport

一、將Msado60_Backcompat_x64.tlb複製到C:\Program Files\Common Files\System\ado\目錄下下載

二、再將C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe複製到C:\Program Files\Common Files\System\ado\目錄下程序

三、運行CMD,im

       分別輸入:

             pushd C:\Program Files\Common Files\System\ado\回車
             regtlibv12.exe msado60_Backcompat_x64.tlb回車

註冊msado60_Backcompat_i386.tlb

一、將Msado60_Backcompat_i386.tlb複製到C:\Program Files (x86)\Common Files\System\ado\目錄下

二、再將C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe複製到C:\Program Files (x86)\Common Files\System\ado\目錄下

三、運行CMD,

        分別輸入:

               pushd C:\Program Files (x86)\Common Files\System\ado\回車
               regtlibv12.exe msado60_Backcompat_i386.tlb回車

注意:

32位系統須要註冊Msado60_Backcompat_i386.tlb

64位WIN7系統(INTEL平臺)須要註冊:Msado60_Backcompat_i386.tlbMsado60_Backcompat_x64.tlb這2個文件;

64位WIN7系統(AMD平臺)須要註冊:Msado60_Backcompat_i386.tlbMsado60_Backcompat_ia64.tlb這2個文件;

三、替換程序代碼

若是是VC++

將:

#import "msado15.dll" no_namespace rename("EOF","EndOfFile")

替換爲:

#import "msado60_Backcompat.tlb" no_namespace rename("EOF","EndOfFile")

四、從新生成解決方案便可 

 

參考資料:

http://support.microsoft.com/kb/2517589

http://www.cnblogs.com/dap570/archive/2012/04/05/2433341.html

相關文章
相關標籤/搜索