freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] Problem with freetds_0.62.4 and SQLSetStmtAttrSQL_ATTR_CURSOR_TY PE SQL_CURSOR_STATIC
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] Problem with freetds_0.62.4 and SQLSetStmtAttrSQL_ATTR_CURSOR_TY PE SQL_CURSOR_STATIC
- Date: Sat, 22 Jan 2005 10:20:08 +0100
Il giorno ven, 21-01-2005 alle 16:10 -0500, Lowden, James K ha scritto:
> > From: kwills AT mercantec.com
> > Sent: Friday, January 21, 2005 2:40 PM
> > I am attempting to use the following statement:
> >
> > SqlReturn = SQLSetStmtAttr(stmt, SQL_ATTR_CURSOR_TYPE, (SQLUINTEGER
> > *)SQL_CURSOR_STATIC, 0 );
> >
> > It is giving back an error of: [FreeTDS][SQL Server]Option value
> changed]
> > ...
> > It looks like the SQLSetStmtAttr is failing using FreeTDS but succeeds
> when
> > using Microsoft SQL Server ODBC Driver Version 03.85.1025.
>
> The FreeTDS ODBC library lacks (much) support for cursors. Here is the
> code that generates your message (src/odbc/odbc.c, line 5139):
>
Small correction: FreeTDS ODBC do not support cursors entirely. I hope
to support it in 0.64 (now there are only a lot of TODO comments for
cursors).
> case SQL_ATTR_CURSOR_TYPE:
> /* TODO cursors */
> if (stmt->attr.cursor_type != ui) {
> odbc_errs_add(&stmt->errs, "01S02", NULL, NULL);
> ODBC_RETURN(stmt, SQL_SUCCESS_WITH_INFO);
> }
> stmt->attr.cursor_type = ui;
> break;
>
> >From what I see, 01S02 might not be the best message; perhaps HYC00
> (Optional feature not implemented) or HY011 (Attribute cannot be set
> now) would be more accurate.
>
No, helps state to return this type of error.
The only solution it's to open another connection.
freddy77
-
RE: [freetds] Problem with freetds_0.62.4 and SQLSetStmtAttrSQL_ATTR_CURSOR_TY PE SQL_CURSOR_STATIC,
Lowden, James K, 01/21/2005
- RE: [freetds] Problem with freetds_0.62.4 and SQLSetStmtAttrSQL_ATTR_CURSOR_TY PE SQL_CURSOR_STATIC, Frediano Ziglio, 01/22/2005
Archive powered by MHonArc 2.6.24.