From: Dan Kalowsky Date: Tue, 30 Apr 2002 13:16:01 +0000 (+0000) Subject: re-setting the CURSOR back to DYNAMIC rather than FORWARD_ONLY. This change X-Git-Tag: php-4.2.1RC1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5f264a8e025e949015565c4ca267a2d86228dc1;p=php 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 --- diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index f64b58429c..a06f4e4b4a 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -817,7 +817,7 @@ PHP_FUNCTION(odbc_prepare) /* 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 @@ PHP_FUNCTION(odbc_exec) /* 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);