From: Dan Kalowsky Date: Mon, 21 Jan 2002 14:11:17 +0000 (+0000) Subject: this closes off a number of ODBC bugs. X-Git-Tag: PRE_ISSET_PATCH~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31cd8e0b75bb76e4fe6b904c757393841f195287;p=php this closes off a number of ODBC bugs. # this is a bit hack-ish in it's functionality. The proper answer (allowing # users to set their cursor type) has bugs with some tests cases at this time. # But this is being done to just get ODBC back into working order. --- diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 73e38156ec..e2be83169a 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_DYNAMIC) + if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) == SQL_ERROR) { odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); SQLFreeStmt(result->stmt, SQL_DROP); @@ -1159,7 +1159,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_DYNAMIC) + if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) == SQL_ERROR) { odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); SQLFreeStmt(result->stmt, SQL_DROP);