[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] Issue with SQLDescribeCol
From:       "Emmanuel Stapf" <manus () eiffel ! com>
Date:       2014-11-17 8:07:43
Message-ID: 000001d0023d$919eabe0$b4dc03a0$ () eiffel ! com
[Download RAW message or body]

Great. Thanks,
Manu

> -----Original Message-----
> From: Frediano Ziglio [mailto:freddy77@gmail.com]
> Sent: Sunday, November 16, 2014 10:33
> To: manus@eiffel.com; FreeTDS Development Group
> Subject: Re: [freetds] Issue with SQLDescribeCol
> 
> 2014-11-15 9:33 GMT+00:00 Emmanuel Stapf <manus@eiffel.com>:
> > Hi,
> >
> > I've recently been testing the EiffelStore binding to ODBC against a
> > MSSQL database. For that I'm using unixODBC and freetds. However our
> > code does not work due to the fact that when calling SQLDescribeCol
> > with almost no arguments to get the length of the column name it does not
> return anything.
> >
> > The code we have looks like:
> >
> >   rc = SQLDescribeCol(hstmt, (SQLSMALLINT) index, NULL, 0,
> > &indColName, NULL, NULL, NULL, NULL);
> >
> > I looked at the code of SQLDescribeCol and found that in very old
> > versions it would update indColName and in the latest version although
> > there is a comment at line 2009 of odbc.c that says:
> >
> >         /* cbColNameMax can be 0 (to retrieve name length) */
> >
> > but nothing to that effect. Actually if you look at the following diff:
> >
> > https://gitorious.org/freetds/freetds/commit/5508af66b79f1c6dee70d86f9
> > c673e8b9b1b24ed
> >
> > you see that the code that used to update pcbColName has disappeared
> > from the current version.
> >
> > Am I missing something?
> >
> > Thanks,
> > Manu
> >
> 
> Was not tested/implemented correctly
> 
> Test:
> https://gitorious.org/freetds/freetds/commit/a3639342271313e32dca198e1fe065d534f
> 67b61
> Fix:
> https://gitorious.org/freetds/freetds/commit/167db70e5183ab7fd25ad1916d669ca49b6
> 2199b
> 
> Backported to branch 0.91 too.
> 
> Regards,
>   Frediano

_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic