ADODB. Connection (0x800A0E7A) does not find the provider. This program may not be positive

Source: Internet
Author: User
Tags informix
ADODB is short for ActiveDataObjectsDataBase. It is an intermediate function component used by PHP to access the database. Although PHP is a powerful tool for building a Web system, the function of accessing the database by PHP has never been standardized, use a different and incompatible application interface (API ). To fill this

ADODB is short for Active Data Objects Data Base. It is an intermediate function component for accessing the database in PHP. Although PHP is a powerful tool for building a Web system, the function of accessing the database by PHP has never been standardized, use a different and incompatible application interface (API ). To fill this

ADODB is short for Active Data Objects Data Base. It is an intermediate function component for PHP access.

Although PHP is a powerful tool for building a Web system, the function of accessing the database by PHP has never been standardized, use a different and incompatible application interface (API ). In order to fill this gap, ADODB emerged. Once the interfaces for accessing the database are standardized, the differences between different databases can be hidden. It is very easy to switch to other different databases.

Currently, the latest version of ADODB is V4.62, supporting a variety of database types, such as: MySQL, PostgreSQL, Interbase, Informix, Oracle, ms SQL 7, Foxpro, Access, ADO, Sybase, DB2 and ODBC (among which the driver of PostgreSQL, Informix, and Sybase is contributed by the development of the Free Software Community ).

One of the biggest advantages of using ADODB is that, regardless of the backend database, the methods for accessing the database are the same, so developers do not have, however, you must learn another set of different access methods, which greatly reduces the knowledge burden on developers. The previous knowledge can still be used in the future. When the database platform is transferred, the program code does not have to be too much updated.

In fact, the development concept of ADODB is not the first. DBI appeared earlier than ADODB. It provides Perl to access the database and uses consistent API call interfaces. I believe that friends who have used Perl + DBI will have a similar feeling when they use ADODB again.

My ASP running environment: the operating system is Windows XP SP2, the IIS version is 5.1 by default, and the database is SQL Server 2005 (MDAC version is 2.8)

This error occurs because the dynamic link library (DLL) required by the Microsoft Data Access Component (MDAC) is not yet registered.
Solution for ADODB. Connection (0x800A0E7A): Click Start, click run, and then type regsvr32 "c: \ Program Files \ Common Files \ System \ Ole DB \ sqloledb. dll"
After receiving the confirmation of successful DLL registration, click OK.

0 & image. height> 0) {if (image. width >=700) {this. width = 700; this. height = image. height * 700/image. width ;}} "border = 0> but when talking with other students later, it was found that some people, despite using this method, ADODB. the Connection (0x800A0E7A) problem still persists. After some debugging, it is found that if the ASP code that can be run on the local machine runs on the other machine, no ADODB occurs. the Connection (0x800A0E7A) error is successful. The database is connected and data is written. When the other party's code is copied to the local machine, the local ADODB. Connection (0x800A0E7A) error still exists. Check carefully and find that your code is incorrect. Therefore, an error in the Code may also cause the ADODB. Connection (0x800A0E7A) error.

The following is a piece of test code to help colleagues who still have the ADODB. Connection (0x800A0E7A) error.

1. Create a Test Database

0 & image. height> 0) {if (image. width >=700) {this. width = 700; this. height = image. height * 700/image. width ;}} "border = 0>
2. Copy the following code to notepad and name it test. asp. Put it in the main directory (replace the User ID and Password with your own User name and Password)



Message Board

<%
'If any submitted data is accepted
If Request. Form. Count> 0 Then
'Define database connection objects and Data Record Sets
Dim objDB, strSQL, strConnString
Set objDB = Server. CreateObject ("ADODB. Connection ")
'Database connection string
StrConnString = "Provider = Sqloledb; User ID = sa; Password = sapassword; Initial Catalog = Test; Data Source = 127.0.0.1 ;"
'Connect to the database
ObjDB. open strConnString
'Receive submitted data
Dim UserName, Contact, Detail
UserName = Request. Form ("UserName ")
Contact = Request. Form ("Contact ")
Detail = Request. Form ("Detail ")
'Write the SQL string and insert the data table
StrSQL = "Insert Test (UserName, Contact, Detail) Values ('" & UserName & "', '" & Contact & "', '" & Detail &"')"
'Execute the SQL string
ObjDB. Execute (strSQL)
Set objDB = nothing
End If
%>




3. enter 127.0.0.1/test. asp in the address bar to display the following interface:

0 & image. height> 0) {if (image. width >=700) {this. width = 700; this. height = image. height * 700/image. width ;}} "border = 0>

Related Article

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.