|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-07 12:02 UTC] sniper@php.net
[2003-12-07 12:24 UTC] gerrykwan at netvigator dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 22:00:01 2025 UTC |
Description: ------------ I am using ADO connection to connect an Access database. I wrote a php file that works perfectly with the version of php4.3.2 cgi version for Win. Now the application is moved to another system with php4.3.4 as a module of Apache 1.3.28. The code is exactly the same, but this time the output is sorts of errors. Reproduce code: --------------- $db = library.MDB; $realp = realpath("library.MDB"); $dsn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$realp"; $conn = new COM("ADODB.Connection") or die ("Connection create fail"); $conn->Open($dsn); $rs = $conn->Execute("SELECT * FROM library ORDER BY code ASC"); $rs->Close(); $conn->Close(); Expected result: ---------------- The expected result is a table of all records in the database. The html code for displaying the results has no errors. As I mentioned, the code works well before. Actual result: -------------- Warning and errors: Warning: (null)(): Invoke() failed: ?o?ͨҥ~???p(translation: exceptional occasion happens)?C Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft Access Driver] ?ѼƤӤ֡A?w???Ӽ? 1(translation: too few parameters, expected number is 1)?C in c:\program files\apache group\apache\htdocs\book\book_search.php on line "$rs = $conn->Execute("SELECT * FROM library ORDER BY code ASC");" Fatal error: Call to a member function on a non-object in c:\program files\apache group\apache\htdocs\book\book_search.php on line "$rs->Close();"