#26549 [Bgs]: Execute() not functioning in ADO
| From: | gerrykwan at netvigator dot com | Date: | Sun, 07 Dec 2003 17:24:27 +0000 |
| Subject: | #26549 [Bgs]: Execute() not functioning in ADO | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51782@lists.php.net to get a copy of this message | ||
ID: 26549
User updated by: gerrykwan at netvigator dot com
Reported By: gerrykwan at netvigator dot com
Status: Bogus
Bug Type: COM related
Operating System: Win XP SP1
PHP Version: 4.3.4
New Comment:
Thank you for your reply.
I just wonder if only php5 can solve the problem.
Is it sure there is no way to have proper connection using similar
method or coding in php4?
Previous Comments:
------------------------------------------------------------------------
[2003-12-07 12:02:59] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Try the latest PHP 5 which has a rewritten DOM extension.
(PHP 4 dom is not supported anymore)
------------------------------------------------------------------------
[2003-12-07 09:23:58] gerrykwan at netvigator dot com
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();"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26549&edit=1