Skip to Content.
Sympa Menu

freetds - [freetds] Issue with SQLDescribeCol

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Emmanuel Stapf" <manus AT eiffel.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Issue with SQLDescribeCol
  • Date: Sat, 15 Nov 2014 10:33:12 +0100

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/5508af66b79f1c6dee70d86f9c673e8b9b1b24ed

you see that the code that used to update pcbColName has disappeared from the
current
version.

Am I missing something?

Thanks,
Manu

------------------------------------------------------------------------
Eiffel Software
805-685-1006
http://www.eiffel.com
Customer support: http://support.eiffel.com
User group: http://groups.eiffel.com/join
------------------------------------------------------------------------






Archive powered by MHonArc 2.6.24.

Top of Page