Ask Fatalerror: Class 'com' notfoundin

Source: Internet
Author: User
Could you tell me Fatalerror: ClassCOMnotfoundin I used when connecting to the access library but reported Fatalerror: ClassCOMnotfoundin when using this error, is it because php. ini has nothing to open? ------ Solution ------------------ Fatal error: Class 'com' not found in
I used when connecting to the access library
Fatal error: Class 'com' not found in. Is it because something in php. ini is not enabled?

------ Solution --------------------
The COM component in WINDOWS is not installed!

Are you using IIS!

------ Solution --------------------
The name of the DCOM server. the component is used on this server. If it is NULL, it is assumed to be localhost. To allow DCOM, you must set com. allow_dcom in php. ini to TRUE.

------ Solution --------------------
If you want to Access MS Access in Windows by running PHP in Unix, you need the Unix ODBC driver:

1. install MySQL on your platform according to MySQL instructions. You can get the latest version from (download from the latest image site !). In addition to setting the database and configuring the user account, special configuration is not required. you should add a % in the host field or use it to access the Windows machine name of MySQL. Write down your server name, user name, and password.

2. download the MyODBC for Windows driver from the MySQL website. The latest version is (which can also be used for NT and source code ). Install it on your Windows machine. You can use the tools included in this program to test its operations.

3. use the ODBC manager in the control panel to create a user or system dsn, set the dsn name, and enter the MySQL database host name, user name, password, and port you configured in step 1.

4. install Access to ensure proper plug-ins... at least ODBC support and connection table manager are required.

5. create an Access database. Right-click the Table window and select Link Tables, or select Get External Data-> Link Tables under the File menu. When the file browsing window opens, select ODBC as the file type. Then select System dsn and the name of the dsn created in step 3. Select the table to be connected and click OK. Now you can open the table on your MySQL server and create/delete/edit data! You can also construct queries, import/export tables to MySQL, and construct forms and reports.


1. you can create tables in Access and export them to MySQL, and connect them back. In this way, table creation is faster.

2. when creating a table in Access, you must define a basic key name to obtain the write permission of the table. Make sure that the basic key name is created in MySQL before the table is connected to Access.

3. if the table is modified in MySQL, you must connect to Access again. Open Tools> Add-ins> Linked table manager, find your odbc dsn, and select the table to be reconnected. You can also move the dsn source here and select always prompt for new location before clicking OK.

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: 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.