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: Frediano Ziglio <freddyz77 AT tin.it>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP
  • Date: 14 Oct 2002 21:13:13 +0200


Il lun, 2002-10-14 alle 19:26, Nick Gorham ha scritto:
> 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
>

Fixed in CVS. Old implementation return SQL_SUCCESS if requested
information was not available, so PHP thought that our driver support
absolute direction. Fixed returning ERROR..

Only to review to return error instead of agree only to go on...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page