【adodb连接Access数据库问题】不能连接?

WBOY
Release: 2016-06-23 13:46:43
Original
1310 people have browsed it

<?php	$RootDir = $_SERVER['DOCUMENT_ROOT']; 	define('ROOT',$RootDir);	$path = ROOT.'/Project/01/db/db_meeting.accdb';	echo "$path";	include "../adodb/adodb.inc.php";	$conn = ADONewConnection('access');	$conn->Pconnect("Driver={Microsoft Access Driver (*.accdb)};Dbq=$path");	$conn->execute("set names gb2312");	print $conn->ErrorMsg();?>
Copy after login




浏览器上输出
D:/phpStudy/WWW/Project/01/db/db_meeting.accdb
Warning: odbc_pconnect() [function.odbc-pconnect]: SQL error: [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序, SQL state IM002 in SQLConnect in D:\phpStudy\WWW\Project\01\adodb\drivers\adodb-odbc.inc.php on line 85
[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序


回复讨论(解决方案)

如果数据库文件格式转换为.mdb,则
D:/phpStudy/WWW/Project/01/db/db_meeting.mdb[Microsoft][ODBC Microsoft Access 驱动程序] 无效的 SQL语句;期待 'DELETE'、'INSERT'、'PROCEDURE'、'SELECT'、或 'UPDATE'。

是不是 2008系统? 程序是64位,数据库32位,所以…………

是不是 2008系统? 程序是64位,数据库32位,所以…………


2008?
WIN7 32

建议还是用mysql吧

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template