cvs: php4 /ext/odbc php_odbc.c

From: Date: Mon, 21 Jan 2002 14:11:18 +0000
Subject: cvs: php4 /ext/odbc php_odbc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9121@lists.php.net to get a copy of this message
kalowsky Mon Jan 21 09:11:18 2002 EDT Modified files: /php4/ext/odbc php_odbc.c Log: 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. Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.113 php4/ext/odbc/php_odbc.c:1.114 --- php4/ext/odbc/php_odbc.c:1.113 Tue Dec 11 10:29:59 2001 +++ php4/ext/odbc/php_odbc.c Mon Jan 21 09:11:17 2002 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.113 2001/12/11 15:29:59 sebastian Exp $ */ +/* $Id: php_odbc.c,v 1.114 2002/01/21 14:11:17 kalowsky Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -817,7 +817,7 @@ /* 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 @@ /* 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);

« previous php.cvs (#9121) next »