PHP ODBC connect()到Access-体系结构不匹配 [英] PHP ODBC connect() to Access - architecture mismatch

查看:122
本文介绍了PHP ODBC connect()到Access-体系结构不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Google上搜索了几个小时.

I have googled for hours now.

我读了无数的文章,例如:是否存在Windows 7 ODBC Access驱动程序?

I have read countless articles such as: Is there a Windows 7 ODBC driver for Access?

我尝试同时使用ODBC管理员-并成功为这两个系统成功添加了系统DSN:

I have tried using both the ODBC admin - and have managed to successfully add there system DSN for both:

  • Microsoft Access数据库
  • Microsoft执行Access数据库

当我尝试连接到本地存储的Access DB时:

When I attempt to connect to Access DB stored locally:

odbc_connect('Aquarius2', '', '');

我收到以下错误:

odbc_connect():SQL错误:[Microsoft] [ODBC驱动程序管理器]指定的DSN包含驱动程序和应用程序之间的体系结构不匹配,第3行的C:\ export \ export.php中的SQLConnect中的SQL状态IM014.

简单脚本尝试安装最新的访问驱动程序-Aquarius2是我的DSN的名称仍然失败.

Simple script tried installing the latest access drivers - Aquarius2 is the name of my DSN still fails.

我没主意-我想念什么?

I'm out of ideas - what am I missing?

关于, 亚历克斯

推荐答案

您正尝试将64位应用程序与32位ODBC驱动程序一起使用,反之亦然.查看在64位Windows平台上的ODBC .

You are attempting to use a 64 bit application with a 32 bit ODBC driver or vice versa. Look at ODBC on 64-bit Windows Platforms.

您需要首先确定您的PHP应用程序是64位还是32位.

You need to determine whether your PHP application is 64 bit or 32 bit first.

然后,一旦确定需要启动正确的ODBC管理员,则有2个,一个为32位,另一个为64位. 64位ODBC管理员位于管理工具,控制面板中,而32位ODBC管理员位于%windir\syswow64\odbcad32.exe中.

Then once you've ascertained that you need to start the correct ODBC administrator - there are 2 of them, one for 32 bit and one for 64 bit. The 64 bit ODBC administrator is in Adminstrative tools, control panel and the 32 bit one is in %windir\syswow64\odbcad32.exe.

一旦您将应用程序体系结构与合适的ODBC管理员进行了匹配,就需要创建系统DSN.如果在管理员中找不到MS Access驱动程序,则需要为该体系结构下载一个.我不确定是否有64位的MS Access ODBC驱动程序;如果没有,则必须更改应用程序体系结构.

Once you've matched your application architecture to the right ODBC administrator, you need to create the system DSN. If you cannot find the MS Access driver in the administrator, you'll need to download one for that architecture. I'm not sure if there is a 64 bit MS Access ODBC driver; if there isn't, you'll have to change your application architecture.

我引用的文章有更多信息.

这篇关于PHP ODBC connect()到Access-体系结构不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆