diff options
| author | Dan Kalowsky <kalowsky@php.net> | 2002-01-21 14:11:17 +0000 |
|---|---|---|
| committer | Dan Kalowsky <kalowsky@php.net> | 2002-01-21 14:11:17 +0000 |
| commit | 31cd8e0b75bb76e4fe6b904c757393841f195287 (patch) | |
| tree | 3f68792943ec4a4ca3dd45537dc22b88f63258b3 /ext | |
| parent | 580a4701ba665af12fcda129544d8ab09bf1437c (diff) | |
| download | php-git-31cd8e0b75bb76e4fe6b904c757393841f195287.tar.gz | |
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.
Diffstat (limited to 'ext')
| -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 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); |
