Bug #76531 [Com]: Can't get dateTime field with Sybase 16 ODBC driver

From: Date: Thu, 05 Aug 2021 06:01:19 +0000
Subject: Bug #76531 [Com]: Can't get dateTime field with Sybase 16 ODBC driver
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235602@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76531&edit=1

 ID:                 76531
 Comment by:         max at e-i dot com dot ru
 Reported by:        t dot raab at sanitas dot at
 Summary:            Can't get dateTime field with Sybase 16 ODBC driver
 Status:             No Feedback
 Type:               Bug
 Package:            ODBC related
 Operating System:   Windows 7
 PHP Version:        7.2.7
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Hi, we are experiencing exactly the same problem on PHP 7.4 / RHEL.

$result = odbc_exec($conn, "select dateTimeField from aTable");
print_r(odbc_fetch_array($result));

always gets empty dateTimeField value. Everything's OK with PDO though, so we would agree on
that's a PHP odbc module issue.


Previous Comments:
------------------------------------------------------------------------
[2020-10-18 04:22:14] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

------------------------------------------------------------------------
[2020-10-05 09:43:13] cmb@php.net

If this is still an issue with any of the actively supported PHP
versions[1], please update the PHP version info, provide a minimal
reproduce script and an ODBC trace of running that script.

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2018-06-26 08:57:10] t dot raab at sanitas dot at

Description:
------------
Dear All,

as Sybase support was dropped in PHP version 7, we are migrating our legacy application to connect
to a SYBASE ASE database via ODBC. Our application is finally working quite well with ASE 15.5.

The problem is that sooner or later the database will be updated to Sybase ASE 16 and we found that
retrieving any dateTime field with the newer Sybase 16 ODBC driver returns an empty string. 

We also found that connecting via pdo_odbc retrieves the dateTime fields correctly, so we believe
the error lies in PHP's odbc module. Unfortunately switching to PDO is not an option, as it is
not possible to retrieve the field data type via PDO.




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76531&edit=1


Thread (6 messages)

« previous php.bugs (#235602) next »