php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26549 Execute() not functioning in ADO
Submitted: 2003-12-07 09:23 UTC Modified: 2003-12-07 12:24 UTC
From: gerrykwan at netvigator dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.3.4 OS: Win XP SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gerrykwan at netvigator dot com
New email:
PHP Version: OS:

 

 [2003-12-07 09:23 UTC] 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();"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-07 12:02 UTC] 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 12:24 UTC] gerrykwan at netvigator dot com
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?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC