Re: SQL_DESC_UNSIGNED column attribute returns the wrong value for tinyint SQL Server columns

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4e23U5ojUZtu_k+HEC36rR9_j9+X35A2KE9Y1reD5Zt2Q@mail.gmail.com>
It would be very helpful. Also I think is broken for Sybase unsigned types
then. I think in this case describecol test should be expanded and fixed.

Frediano


2013/4/2 James K. Lowden <[email protected]>

> On Mon, 01 Apr 2013 16:03:22 -0600
> Sergio delaCruz <[email protected]> wrote:
>
> > When dealing with a bug in our codebase
> > (http://bugs.mysql.com/bug.php?id=68084) we realized that the return
> > value that we get when requesting the SQL_DESC_UNSIGNED attribute via
> > the SQLColAttribute function for a SQL Server TINYINT column differs
> > from what one would expect (SQL_TRUE). Microsoft's drivers return the
> > correct value (TINYINT is by definition unsigned in T-SQL).
> >
> > Is this a bug in FreeTDS? Can you comment on this?
>
> Thanks for the problem report.
>
> src/odbc/odbc.c:3160:
>
>                 /* TODO perhaps TINYINY and BIT.. */
>                 drec->sql_desc_unsigned = SQL_FALSE;
>
> appears to be the source of your bug.
>
> >From many TODO comments in the function odbc_populate_ird, it would
> appear you will find other discrepancies.  We would be glad to apply
> any patches that bring the ird into closer conformance with Microsoft's
> driver.
>
> HTH.
>
> --jkl
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.