Home Backend Development PHP Tutorial 请教Fatal error: Class 'COM' not found in

请教Fatal error: Class 'COM' not found in

Jun 13, 2016 pm 01:10 PM
access mysql nbsp odbc windows

请问Fatal error: Class 'COM' not found in
我在做连接access库的时候用到adodb-ado.inc.php
但是在使用的时候报
Fatal error: Class 'COM' not found in 这个错误,是因为php.ini里面什么东西没有开吗?

------解决方案--------------------
应该是WINDOWS里的COM组件没有装好吧!

你用的是IIS么!

------解决方案--------------------
DCOM 服务器的名字,组件在此服务器上被取用。如果是 NULL,则假定是 localhost。想要允许 DCOM,必须将 php.ini 中的 com.allow_dcom 设为 TRUE。 


------解决方案--------------------
在 Unix 下运行 PHP 而想访问 Windows 中的 MS Access,那需要 Unix ODBC 驱动程序:

1.根据 MySQL 的说明在你的平台上安装 MySQL。可以从 www.mysql.com 得到最新版(从离你最近的镜像站点下载!)。除了设定数据库和配置用户帐号以外不需要特殊的配置,应该在 host 字段中放一个 % 或者要用来访问 MySQL 的 Windows 机器名。记下自己的服务器名,用户名和密码。 

2.从 MySQL 网站下载 MyODBC for Windows 驱动程序。最新版是 myodbc-2_50_19-win95.zip(也可以用于 NT,以及源代码)。在你的 Windows 机器中安装它。可以用此程序中包括的工具来测试其操作。 

3.用控制面板中的 ODBC 管理器新建一个用户或系统 dsn,设定 dsn 名称,输入你在第一步中配置的 MySQL 数据库的主机名,用户名,密码,端口等。 

4.完整安装 Access,这样可以确保得到适当的插件 ... 至少需要 ODBC 支持和连接表管理器。 

5.新建一个 Access 数据库。在 Table 窗口点击右键并选择 Link Tables,或者在 File 菜单下选择 Get External Data -> Link Tables。当文件浏览窗口打开后,选择文件类型为:ODBC。接着选择 System dsn 以及在第三步建立的 dsn 的名字。再选择要连接的表,点击 OK。现在你可以在你的 MySQL 服务器中打开表并新建/删除/编辑数据了!也可以构造查询,导入/导出表到 MySQL,构造表单和报告等。 


技巧: 


1.可以在 Access 中构造表并导出到 MySQL 中,再把它们连接回来。这样可以使表的建立更快。 

2.在 Access 中建立表时,必需定义一个基本键名来取得表的写权限。确认在把表连接到 Access 之前在 MySQL 中建立了基本键名。 

3.如果在 MySQL 中修改了表,必须重新连接到 Access。打开 Tools>Add-ins>Linked table manager,找到你的 ODBC DSN,然后在这里选择要重新连接的表。也可以在这里移动 dsn 源,在点击 OK 之前选中 always prompt for new location。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

Can vs code run in Windows 8 Can vs code run in Windows 8 Apr 15, 2025 pm 07:24 PM

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

How to call docker lnmp How to call docker lnmp Apr 15, 2025 am 11:15 AM

Docker LNMP container call steps: Run the container: docker run -d --name lnmp-container -p 80:80 -p 443:443 lnmp-stack to get the container IP: docker inspect lnmp-container | grep IPAddress access website: http://<Container IP>/index.phpSSH access: docker exec -it lnmp-container bash access MySQL: mysql -u roo

What is vscode What is vscode for? What is vscode What is vscode for? Apr 15, 2025 pm 06:45 PM

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages ​​and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

vscode cannot install extension vscode cannot install extension Apr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

How to back up vscode settings and extensions How to back up vscode settings and extensions Apr 15, 2025 pm 05:18 PM

How to back up VS Code configurations and extensions? Manually backup the settings file: Copy the key JSON files (settings.json, keybindings.json, extensions.json) to a safe location. Take advantage of VS Code synchronization: enable synchronization with your GitHub account to automatically back up all relevant settings and extensions. Use third-party tools: Back up configurations with reliable tools and provide richer features such as version control and incremental backups.

What's going on with vscode not running python What's going on with vscode not running python Apr 15, 2025 pm 06:00 PM

The most common "cannot run Python" problem stems from the misconfiguration of the Python interpreter path. Solutions include: confirming Python installation, configuring VS Code, and using a virtual environment. In addition, there are efficient debugging techniques and best practices such as breakpoint debugging, variable monitoring, log output, and code formatting, such as isolating dependencies using virtual environments, tracking code execution using breakpoints, and tracking variable changes in real time using monitoring expressions, etc., which can greatly improve development efficiency.

How to solve the problem of vscode cannot select python interpreter How to solve the problem of vscode cannot select python interpreter Apr 15, 2025 pm 05:57 PM

VS Code Python interpreter selection puzzle: Problem Cause: The environment configuration is confusing, which may cause the following problems: Multiple Python versions of coexistence environment variable configuration error VS Code Extension Problem Virtual Environment Problem Solving Steps: Check Python Installation Verification Environment Variable Check VS Code Python Extension Processing Virtual Environment Manually Select the Interpreter

See all articles