[freetds] Moving the resultset pointer

Lowden, James K LowdenJK at bernstein.com
Mon Jan 5 17:24:20 EST 2004


> 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.  

--jkl


-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.





More information about the FreeTDS mailing list