讓人鬱悶了好久的問題,終於解決了,之前網上也看到一些解決方案,但大多沒有解決問題,所以記錄下來,以供參考之用(ADO Could Not Find The Specified Provider)

來源:互聯網
上載者:User
文章目錄
  • Steps to Reproduce Behavior
PRB: ERR "ADO Could Not Find The Specified Provider"View products that this article applies to.
Article ID : 191271
Last Review : November 3, 2003
Revision : 3.1
This article was previously published under Q191271On This Page
SYMPTOMS
CAUSE
RESOLUTION
STATUS
MORE INFORMATION
  Steps to Reproduce Behavior
APPLIES TO

SYMPTOMSThe following error message occurs when trying to connect to SQL Server using ActiveX Data Objects (ADO):

ADODB.Connection error '800a0e7a'
ADO could not find the specified provider.  

CAUSEThe MSDASQL OLE DB provider is either unavailable or is not registered. This can be caused by an incomplete upgrade or a bad install of the Microsoft Data Access Components (MDAC) components.

 

RESOLUTIONHere are two ways to resolve this problem:

Register the Msdasql.dll using the following command:

REGSVR32 "C:\Program Files\Common Files\System\ole db\MSDASQL.DLL"
Reinstall the Microsoft Data Access Components used. The newest version of MDAC can be downloaded from the following Web site:

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp (http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp)
 

STATUSThis behavior is by design.

 

MORE INFORMATION

Steps to Reproduce Behavior
1. Unregister "C:\Program Files\Common Files\System\ole db\Msdasql.dll" using REGSVR32 from the Command line. Here is an example:

REGSVR32 -U "C:\Program Files\Common Files\System\ole db\MSDASQL.DLL"
2. Try to connect to the PUBS database on SQL Server using ADO.

RESULTS: The error occurs.

 

APPLIES TO
Microsoft Data Access Components 1.5
Microsoft Data Access Components 2.0
Microsoft Data Access Components 2.1
Microsoft Data Access Components 2.8
Microsoft Data Access Components 2.6
Microsoft Data Access Components 2.7
Microsoft Data Access Components 2.8

上面是微軟英文網頁上面的解決方案,可是中文網頁上面是沒有的,唉,沒辦法啊,其實就是重新註冊一下一個資料訪問組件,相信很多人都遇到過這樣的問題。希望對大夥有用吧。
它提供了兩種解決方案,
一種是:

Register the Msdasql.dll using the following command:

REGSVR32 "C:\Program Files\Common Files\System\ole db\MSDASQL.DLL"

用 REGSVR32 "C:\Program Files\Common Files\System\ole db\MSDASQL.DLL" 重新註冊一下這個資料訪問組件

第二種是下載重新安裝這個組件:
Reinstall the Microsoft Data Access Components used. The newest version of MDAC can be downloaded from the following Web site:

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp (http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp)

其實之前我也下載過一個2.8的版本重新安裝過,可是沒有起作用。呵呵。所以才鬱悶了好久的。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.