Re: ODBC error in 4.0.0 not in RC2
| From: | Andreas Karajannis | Date: | Sun, 21 May 2000 10:55:43 +0000 |
| Subject: | Re: ODBC error in 4.0.0 not in RC2 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19045@lists.php.net to get a copy of this message | ||
"Gustafson, Mårten" wrote:
>
> Can I make som simple change in the source to get rid of this problem?
>
I have changed this in CVS - do a cvs update or see the below diff.
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.48 php4/ext/odbc/php_odbc.c:1.49
--- php4/ext/odbc/php_odbc.c:1.48 Thu May 18 17:34:31 2000
+++ php4/ext/odbc/php_odbc.c Sun May 21 10:46:51 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.48 2000/05/18 15:34:31 zeev Exp $ */
+/* $Id: php_odbc.c,v 1.49 2000/05/21 08:46:51 kara Exp $ */
#if defined(COMPILE_DL) || defined(COMPILE_DL_ODBC)
#include "dl/phpdl.h"
@@ -468,8 +468,11 @@
RETCODE rc;
ODBCLS_FETCH();
- while(henv != SQL_NULL_HENV){
+ /* This leads to an endless loop in many drivers!
+ *
+ while(henv != SQL_NULL_HENV){
do {
+ */
rc = SQLError(henv, conn, stmt, state,
&error, errormsg, sizeof(errormsg)-1,
&errormsgsize);
if (func) {
@@ -479,9 +482,10 @@
php_error(E_WARNING, "SQL error: %s, SQL state
%s",
errormsg, state);
}
-
+ /*
} while (SQL_SUCCEEDED(rc));
}
+ */
}
void php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)