From: Wez Furlong Date: Thu, 7 Jul 2005 14:20:04 +0000 (+0000) Subject: DB2 wants us to use the proper ODBC 3 function for closing a cursor. X-Git-Tag: php-5.1.0b3~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc09c2ef9c9613862499eb98fd49c06195df0ff5;p=php DB2 wants us to use the proper ODBC 3 function for closing a cursor. --- diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index 63e2512dea..76a82c781a 100755 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -51,7 +51,7 @@ static int odbc_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) if (S->stmt != SQL_NULL_HANDLE) { if (stmt->executed) { - SQLCancel(S->stmt); + SQLCloseCursor(S->stmt); } SQLFreeHandle(SQL_HANDLE_STMT, S->stmt); S->stmt = SQL_NULL_HANDLE; @@ -71,7 +71,7 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) char *buf = NULL; if (stmt->executed) { - SQLCancel(S->stmt); + SQLCloseCursor(S->stmt); } rc = SQLExecute(S->stmt); @@ -93,7 +93,7 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) if (!stm) { /* shouldn't happen either */ pdo_odbc_stmt_error("input LOB is no longer a stream"); - SQLCancel(S->stmt); + SQLCloseCursor(S->stmt); if (buf) { efree(buf); } @@ -359,7 +359,7 @@ static int odbc_stmt_fetch(pdo_stmt_t *stmt, } if (rc == SQL_NO_DATA) { - pdo_odbc_stmt_error("SQLFetchScroll"); + /* pdo_odbc_stmt_error("SQLFetchScroll"); */ return 0; }