From:             gerrykwan at netvigator dot com
Operating system: Win XP SP1
PHP version:      4.3.4
PHP Bug Type:     COM related
Bug description:  Execute() not functioning in ADO

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: 發生例外狀況(translation: exceptional
occasion happens)。 Source: Microsoft OLE DB Provider for ODBC Drivers
Description: [Microsoft][ODBC Microsoft Access Driver] 參數太少,預期個數
1(translation: too few parameters, expected number is 1)。 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 bug report at http://bugs.php.net/?id=26549&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26549&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26549&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26549&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26549&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26549&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26549&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26549&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26549&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26549&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26549&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26549&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26549&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26549&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26549&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26549&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26549&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26549&r=float

Reply via email to