]> granicus.if.org Git - php/commitdiff
re-setting the CURSOR back to DYNAMIC rather than FORWARD_ONLY. This change
authorDan Kalowsky <kalowsky@php.net>
Tue, 30 Apr 2002 13:16:01 +0000 (13:16 +0000)
committerDan Kalowsky <kalowsky@php.net>
Tue, 30 Apr 2002 13:16:01 +0000 (13:16 +0000)
broke many other ODBC drivers (obviously testing wasn't extensive).
# oops, well time to make the proper fix

ext/odbc/php_odbc.c

index f64b58429c423791c0f098ac355c4915e824e87e..a06f4e4b4aeb5bcd75b5301988ab38d8c11672cc 100644 (file)
@@ -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);