php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17140 connected to DB2: odbc_error() gives strange results
Submitted: 2002-05-10 09:01 UTC Modified: 2002-05-21 23:32 UTC
From: ernst at paradigma dot net Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 4.1.2 OS: AIX 4.3.3
Private report: No CVE-ID: None
 [2002-05-10 09:01 UTC] ernst at paradigma dot 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...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-21 23:32 UTC] kalowsky@php.net
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.



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 07:01:31 2024 UTC