Bug #17140 Updated: connected to DB2: odbc_error() gives strange results
| From: | kalowsky@php.net | Date: | Wed, 22 May 2002 03:32:43 +0000 |
| Subject: | Bug #17140 Updated: connected to DB2: odbc_error() gives strange results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-8155@lists.php.net to get a copy of this message | ||
ID: 17140
Updated by: kalowsky@php.net
Reported By: ernst@paradigma.net
-Status: Open
+Status: Bogus
Bug Type: ODBC related
Operating System: AIX 4.3.3
PHP Version: 4.1.2
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-05-10 09:01:14] ernst@paradigma.net
Trying odbc_error and odbc_errormsg I got strange strings back instead
of the actual error messages; after saving again and reloading I got
the correct Error/Message; after new reload I got Strange results
again.
Code:
=====
function printerror($code, $msg, $method="array") {
print "<h2>An Error has occured</h2><table
border=0><tr><td><b>Code:
$code</b></td><td>Message: $msg</td></tr></table>";}
$res = odbc_prepare($conn, $stmt);
if(!(odbc_execute($res)))
printerror(odbc_error($conn),odbc_errormsg($conn));
Results:
========
Code: %Ãt % Message: ÃÄ $D ÔH
Code: %ó` % Message: òt %óô %ñô
Code: hp Message: major
It seems I get parts of my Scripts back...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17140&edit=1