文章目錄
- 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的版本重新安裝過,可是沒有起作用。呵呵。所以才鬱悶了好久的。