PHP Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description:</b> \xb2\xd9\xd7\xf7\xd2\xd1\xb1\xbb\xc8\xa1\xcf\xfb\xa1\xa3' in D:\\Software\\wamp\\www\\test.php:5\nStack trace:\n#0 D:\\Software\\wamp\\www\\test.php(5): com->Open('DRIVER={Microso...')\n#1 {main}\n thrown in D:\\Software\\wamp\\www\\test.php on line 5<?php
//phpinfo();
$conn=new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("/cq.mdb");
$conn->Open($connstr) or die("AAA") ;//问题出现在here?>连接不成功,求帮助。PHP异常
//phpinfo();
$conn=new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("/cq.mdb");
$conn->Open($connstr) or die("AAA") ;//问题出现在here?>连接不成功,求帮助。PHP异常
你的文件为 /cq.mdb,显然是不对的,没有人会把数据库文件放在文件系统的根目录上请检查你的库文件的位置
PHP Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description:</b> \xb2\xd9\xd7\xf7\xd2\xd1\xb1\xbb\xc8\xa1\xcf\xfb\xa1\xa3' in D:\\Software\\wamp\\www\\test.php:5\nStack trace:\n#0 D:\\Software\\wamp\\www\\test.php(5): com->Open('DRIVER={Microso...')\n#1 {main}\n thrown in D:\\Software\\wamp\\www\\test.php on line 5
操作已被取消。注意:这并不是因为出现了错误,而是因为目标文件未指定,他无事可做!