#33214 [Opn->Asn]: [PATCH] odbc_next_result does not signal SQL errors
| From: | tony2001@php.net | Date: | Thu, 02 Jun 2005 14:27:51 +0000 |
| Subject: | #33214 [Opn->Asn]: [PATCH] odbc_next_result does not signal SQL errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79810@lists.php.net to get a copy of this message | ||
ID: 33214
Updated by: tony2001@php.net
Reported By: rich at kastle dot com
-Status: Open
+Status: Assigned
Bug Type: ODBC related
Operating System: Windows XP
PHP Version: 5.*, 4.*
-Assigned To:
+Assigned To: kalowsky
Previous Comments:
------------------------------------------------------------------------
[2005-06-01 17:35:46] rich at kastle dot com
Description:
------------
(This bug is in all versions of PHP since 4.*; the patch is against PHP
5.0.4)
If a 2-statement SQL batch is executed, where the first SQL statement
completes correctly but the second SQL statement yeilds an error, there
is no error indication given by odbc_next_result; you simply get FALSE.
I have a patch to correct this:
--- ext/odbc/php_odbc.c~ 2005-01-18 10:07:10.000000000 -0500
+++ ext/odbc/php_odbc.c 2005-06-01 11:01:25.176471600 -0400
@@ -2439,5 +2463,8 @@
RETURN_TRUE;
}
- else {
+ else if(rc == SQL_NO_DATA_FOUND) {
+ RETURN_FALSE;
+ } else {
+ odbc_sql_error(result->conn_ptr, result->stmt, "SQLMoreResults");
RETURN_FALSE;
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33214&edit=1