Skip to Content.
Sympa Menu

freetds - RE: [freetds] Moving the resultset pointer

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Moving the resultset pointer
  • Date: Tue, 06 Jan 2004 08:37:15 -0000

Il lun, 2004-01-05 alle 23:24, Lowden, James K ha scritto:
> > From: Steven Orton [mailto:sorton9999 AT usa.net]
> > Sent: January 5, 2004 4:55 PM
> >
> > I have a technical question that pertains to random access
> > of the rows in a multirow resultset.
> > First of all I am using freeTDS-0.62.dev.20031218 with the
> > 0.2.3 version of
> > ODBC++ (freeodbc) and using TDSVER=7.0 on a RH9.0 client getting at a
> > SQLServer 7.0 DB.
> ...
> > My question is, Can one create a random access multirow
> > resultset using the
> > TDS API.
>
> I don't think it is. You seem to have pointed up a bug in our
> documentation: our api_status.txt file (and new User Guide) indicates
> SQLFetchScroll is "OK", but the source code disagrees:
>
> SQLRETURN SQL_API
> SQLFetchScroll(SQLHSTMT hstmt, SQLSMALLINT FetchOrientation, SQLINTEGER
> FetchOffset)
> {
> INIT_HSTMT;
>
> /* still we do not support cursors and scrolling */
> if (FetchOrientation != SQL_FETCH_NEXT) {
> odbc_errs_add(&stmt->errs, "HY106", NULL, NULL);
> ODBC_RETURN(stmt, SQL_ERROR);
> }
>
> ODBC_RETURN(stmt, _SQLFetch(stmt));
> }
>
> In this case, I'd believe the source code. :-(
>
> You don't get a "HY106" error somewhere along the line?
>
> > If that IS possible, I can try to update my ODBC++
> > library (since I
> > think this is a unsupported library at present).
>
> Only because no one's stepped up to it. There seem to be a few people
> interested in ODBC++; all that remains is for a knowledgeable someone to
> write up how to hook it up to FreeTDS.
>

Well, many ODBC functions rely on many small settings... So it's very
hard to say how complete a function is.

Adding cursors support require to change many functions:
- SQLGetInfo
- SQLFetchScroll
- SQLFetch
- SQLGetCursorName
- SQLSetCursorName
- SQLSetStmtAttr
- SQLSetStmtOption
(I don't know if this list is complete)
So I would have to put partial on all this functions??

Our driver do not support server side cursors and SQLFetchScroll behave
as it should so I put OK on api_status.txt...

SQLExecute/SQLExecDirect/SQLNativeSql require some statement parsing,
some parameters parsing that are not still implemented in FreeTDS...

ODBC drivers do not need to support all these features. Just return
correct information from SQLGetInfo and driver is OK. If your
application require a specific features this means that your application
is not ODBC compatible...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page