cvs: /php4 NEWS /php4/ext/odbc php_odbc.c
| From: | Nick Gorham | Date: | Thu, 09 Dec 1999 09:59:17 +0000 |
| Subject: | cvs: /php4 NEWS /php4/ext/odbc php_odbc.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7707@lists.php.net to get a copy of this message | ||
lurcher Thu Dec 9 04:59:17 1999 EDT
Modified files:
/php4 NEWS
/php4/ext/odbc php_odbc.c
Log:
Report all ODBC error's not just the top of the stack
Index: php4/NEWS
diff -u php4/NEWS:1.69 php4/NEWS:1.70
--- php4/NEWS:1.69 Wed Dec 8 21:08:10 1999
+++ php4/NEWS Thu Dec 9 04:59:16 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ?? ????, Version 4.0 Beta 4
+- Report all ODBC error's not just the one on the top of the stack (lurcher)
- OCI8 now returns NULL values in LONG columns correct. (Thies)
- Added support for a C-like assert() function. (Thies)
- Added CyberCash support. (Evan)
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.14 php4/ext/odbc/php_odbc.c:1.15
--- php4/ext/odbc/php_odbc.c:1.14 Sat Dec 4 14:15:57 1999
+++ php4/ext/odbc/php_odbc.c Thu Dec 9 04:59:17 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.14 1999/12/04 19:15:57 sas Exp $ */
+/* $Id: php_odbc.c,v 1.15 1999/12/09 09:59:17 lurcher Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
@@ -461,17 +461,20 @@
SDWORD error; /* Not used */
char errormsg[255];
SWORD errormsgsize; /* Not used */
+ SQLRETURN ret;
ODBCLS_FETCH();
-
- SQLError(henv, conn, stmt, state,
- &error, errormsg, sizeof(errormsg)-1, &errormsgsize);
- if (func) {
- php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
+
+ do {
+ SQLError(henv, conn, stmt, state,
+ &error, errormsg, sizeof(errormsg)-1, &errormsgsize);
+ if (func) {
+ php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
errormsg, state, func);
- } else {
- php_error(E_WARNING, "SQL error: %s, SQL state %s",
- errormsg, state);
- }
+ } else {
+ php_error(E_WARNING, "SQL error: %s, SQL state %s",
+ errormsg, state);
+ }
+ } while ( SQL_SUCCEEDED( ret ));
}
void php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)