Skip to Content.
Sympa Menu

freetds - Re: [freetds] Finding the FreeTDS ODBC driver

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Finding the FreeTDS ODBC driver
  • Date: Thu, 4 Dec 2008 10:09:02 -0500

Jeff Dyson wrote:
> I am working on a Linux box that was previously configured with FreeTDS.
> An IT admin has "proven" that the box can communicate with SQL Server
> by successfully connecting to the database with the tsql command. My
> questions are - Does a successful tsql connection confirm that a
> FreeTDS ODBC driver is installed on the box? If so, is there a way to
> determine which ODBC driver is in use by the tsql command?

Strictly speaking, your admin is correct: tsql works, ipso facto the *box*
can communicate with the server.

That says nothing about ODBC, though. If your application needs an ODBC
driver, it needs an ODBC driver. Without it, your *application* cannot
communicate with the server.

ODBC is an optional part of a FreeTDS installation. It sounds like yours
wasn't built or installed.

There are two parts to an ODBC installation: the Driver Manager (DM) and
the driver itself. The DM provides the header (.h) files that are used in
commmon between the DM, the driver, and the application. (That way, all
three agree on, say, the integer value of SQL_SUCCESS_WITH_INFO or the
native machine type of DWORD.) One important header file is sql.h,
commonly installed in /usr/local/include.

The DM also mediates between the application and the driver, making the
drivers seem more uniform than they really are. It's possible to build
and use the FreeTDS ODBC driver without a DM (though you still need the
DM's header files) but the resulting application is less portable.

The most popular DM seems to be unixODBC. It includes a utility "isql".
That should also be installed. And finally you should find the FreeTDS
ODBC driver, libtdsodbc.so*.

I hope that clears up some of the mystery. If you have to build the
driver, don't despair. The User Guide is intended to, er, guide you
through the process. There are quite a few steps, but it's a well trod
path.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page