FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16159&edit=1

ID: 16159
Updated by: l.alberton@quipo.it
Reported By: grey580 at yahoo dot com
Summary: mdb2 iserror is reporting informational messages as
errors
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MDB2_Driver_mssql
Operating System: ubuntu
PHP Version: 5.2.5
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: No Feedback
I cannot reproduce this error with the latest MDB2 version in SVN.

The reproducing script provided is not enough to reproduce the issue.


Previous Comments:
------------------------------------------------------------------------

[2009-05-23 19:26:21] doconnor

Markus, you say that "this isn't fixed" - can you link to the closed
reports?

I'm going to bet it's not fixed in MDB2 2.4.1 (stable) vs but is in
2.5.0 (beta).

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

[2009-05-23 19:23:53] doconnor

Also:

http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mssql.php?view=markup#l579

579 $result = @mssql_query($query, $connection);
580 if (!$result) {
581 $err =& $this->raiseError(null, null, null,
582 'Could not execute statement', __FUNCTION__);
583 return $err;
584 }

If the database isn't returning a result here, it raises an error about
the statement failing.

So I would say either mssql_query() is busted or your server is doing
Strange Things with return values.

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

[2009-05-23 19:17:13] doconnor

-Package: MDB2
+Package: MDB2_Driver_mssql


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

[2009-05-23 19:16:49] doconnor

-Status: Open
+Status: Feedback

We are unable to reproduce the bug as reported.
Please provide a simple script (10 lines or less)
or a link to an external script that can be used
to reproduce the bug.

If you can provide the script, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PEAR.


Alberto/Markus, if you could write a unit test which simulates the
database giving back this native message and shows MDB2 wrongly
generating an error, that would be great.

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

[2009-04-30 17:47:49] semi_sentient

I am having the same problem. I've read earlier bug reports on the same
issue and developers of both PHP and PEAR claim that this has been
fixed. It has NOT been fixed. I should also mention that before I
migrated the problematic web application from Visual FoxPro to PHP I
never had these issues.

I receive these "Database context changed..." errors on a weekly basis
on our production servers, but I am unable to reproduce these errors on
my local dev box. Now I suspect that some of our nightly tasks (we have
thousands which run) are changing the database context via "USE"
statements, but that's irrelevant. These should not be reported as
errors if they are informational messages. This is becoming a major pain
in the butt as I have no explanation to offer to our execs (who hear it
from our fortune 500 clients) other than it's a known bug -- which isn't
a good enough response.


Details on our environment:
===========================

OS: MS Windows Server 2003 (SP2)
DBMS: MSSQL Enterprise Edition (64-bit), version 9.00.3257.00 (SP2)
PHP: 5.2.5
PEAR: 1.8.0
MDB2: 2.4.1


Example code snipped which triggers the error:
==============================================

$oRes = NULL;
$sSql = 'UPDATE TableName
SET iValue = 666
WHERE iRecordId = 1';

if (PEAR::isError($oRes = $rDbConn->query($sSql))) {
$bError = true;
$sError = $oRes->getMessage() . "\n\n" . $oRes->getUserInfo();
}


Error message received:
=======================

_doQuery: [Error message: Could not execute statement]
[Last executed query: UPDATE TableName
SET iValue = 666
WHERE iRecordId = 1']

[Native code: 0]
[Native message: Changed database context to 'TableName'.]

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=16159

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedOct 3, '09 at 9:53a
activeOct 3, '09 at 9:53a
posts1
users1
websitepear.php.net

1 user in discussion

L Alberton: 1 post

People

Translate

site design / logo © 2022 Grokbase