ID: 29583
Updated by: [EMAIL PROTECTED]
Reported By: edwin at rabbito dot org
-Status: Open
+Status: Feedback
Bug Type: COM related
Operating System: Windows
PHP Version: 5CVS-2004-08-09 (dev)
New Comment:
Crash or exception?
Paste the output you see from the CLI here please.
Previous Comments:
------------------------------------------------------------------------
[2004-08-09 11:54:27] edwin at rabbito dot org
Description:
------------
When trying to retrieve a date field from an Access 97 database, the
actual data returned is different from PHP4 (PHP 4 returns a timestamp,
whereas PHP 5 returns a date, ie) 02/04/04 instead of a timestamp). By
calling the code (as attached) in PHP5, PHP does not return error
gracefully, but crashes.
(seems to be something that is not yet fixed in bug#29392)
Reproduce code:
---------------
$security="C:\access97.mdw";
$user="access";
$password="access";
$dsn="Driver={Microsoft Access Driver (*.mdb)};
DBQ=$database;SystemDB=$security;Uid=$user;Pwd=$password";
$db = new COM("ADODB.Connection");
$db->open($dsn);
$query="SELECT DateField1 FROM [Table1];";
$rs = $db->execute($query);
if (!$rs->EOF()) {
echo strlen($rs->Fields(0)->Value);
}
Expected result:
----------------
Either an error should be returned due to invalid type
($rs->Fields(0)->Value in date type), or the actual length the the date
string.
Actual result:
--------------
PHP crashed
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29583&edit=1