Skip to Content.
Sympa Menu

freetds - RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Nick Gorham <nick AT easysoft.com>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP
  • Date: Mon, 14 Oct 2002 18:26:11 +0100


Castellano, Nicholas wrote:
So we probably need the SQLGetInfo() call to return a code indicating that
we don't support ExtendedFetch. Can you try this patch and let me know if
it makes any difference?

I would suspect the call to SQLGetInfo, it may be making PHP decide it can set the cursor type.

#ifdef HAVE_SQL_EXTENDED_FETCH
/* Solid doesn't have ExtendedFetch, if DriverManager is used, get Info,
whether Driver supports ExtendedFetch */
rc = SQLGetInfo(conn->hdbc, SQL_FETCH_DIRECTION, (void *) &scrollopts, sizeof(scrollopts), NULL);
if (rc == SQL_SUCCESS) {
if ((result->fetch_abs = (scrollopts & SQL_FD_FETCH_ABSOLUTE))) {
/* 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)
== SQL_ERROR) {
odbc_sql_error(conn, result->stmt, " SQLSetStmtOption");
SQLFreeStmt(result->stmt, SQL_DROP);
efree(result);
RETURN_FALSE;
}
}
} else {
result->fetch_abs = 0;
}
#endif

--
Nick Gorham
Easysoft Limited http://www.easysoft.com





Archive powered by MHonArc 2.6.24.

Top of Page