cvs: php4(PHP_4_2_0) /ext/odbc php_odbc.c

From: Date: Tue, 30 Apr 2002 13:16:02 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/odbc php_odbc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11559@lists.php.net to get a copy of this message
kalowsky Tue Apr 30 09:16:02 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/odbc php_odbc.c Log: re-setting the CURSOR back to DYNAMIC rather than FORWARD_ONLY. This change broke many other ODBC drivers (obviously testing wasn't extensive). # oops, well time to make the proper fix Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.120.2.1 php4/ext/odbc/php_odbc.c:1.120.2.2 --- php4/ext/odbc/php_odbc.c:1.120.2.1 Mon Apr 8 18:21:30 2002 +++ php4/ext/odbc/php_odbc.c Tue Apr 30 09:16:01 2002 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.120.2.1 2002/04/08 22:21:30 sniper Exp $ */ +/* $Id: php_odbc.c,v 1.120.2.2 2002/04/30 13:16:01 kalowsky Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -817,7 +817,7 @@ /* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other type if not possible. */ - if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) + if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_DYNAMIC) == SQL_ERROR) { odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); SQLFreeStmt(result->stmt, SQL_DROP); @@ -1180,7 +1180,7 @@ /* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other type if not possible. */ - if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) + if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_DYNAMIC) == SQL_ERROR) { odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); SQLFreeStmt(result->stmt, SQL_DROP);

« previous php.cvs (#11559) next »