diff options
| author | Dan Kalowsky <kalowsky@php.net> | 2002-04-30 13:16:01 +0000 |
|---|---|---|
| committer | Dan Kalowsky <kalowsky@php.net> | 2002-04-30 13:16:01 +0000 |
| commit | c5f264a8e025e949015565c4ca267a2d86228dc1 (patch) | |
| tree | 6ef09feeb9e16f3b4a9990adf31c514e5926f732 | |
| parent | e78a9cc5d778c5cb746fbe371caaa53155203551 (diff) | |
| download | php-git-c5f264a8e025e949015565c4ca267a2d86228dc1.tar.gz | |
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
| -rw-r--r-- | ext/odbc/php_odbc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
