From: Dan Kalowsky Date: Tue, 30 Apr 2002 13:17:48 +0000 (+0000) Subject: reverting the cursor change as it seems to break many ODBC drivers. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~338 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d55c9134c81cd3b697f8e1abf713396f2a422345;p=php reverting the cursor change as it seems to break many ODBC drivers. --- diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4bf7468e1a..5942c97683 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -810,7 +810,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); @@ -1171,7 +1171,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);