[freetds] Unable to connect to Data Source using iodbctest

Lowden, James K LowdenJK at bernstein.com
Wed Sep 22 11:09:45 EDT 2004

-----Original Message-----
From: Lee, Gary
Sent: Tuesday, September 21, 2004 6:09 PM

> Problem in a nutshell:  tslq works, iodbctest doesn't.
> [ODBC Data Sources]
> Canada = Foreign Symbol Database
> [Canada]
> Driver          = /usr/local/freetds/lib/libtdsodbc.so
> Description     = FREETDS / odbc test db
> Host            = qa1
> Port            = 1433
> ServerType      = SQL Server 2000
> FetchBufferSize = 99
> UserName        = gary
> Password        = lucky
> Database        = IMM2
> ServerOptions   = 
> ConnectOptions  = 
> Options         = 
> ReadOnly        = no
> [Default]
> Driver          = /usr/local/freetds/lib/libtdsodbc.so
> Questions:
> 1. Most imortantly:  Why doesn't it connect using the iodbctest 
> program?  I assume it's an odbc.ini  problem, since tsql works.


You didn't indicate a SERVER.  Most of the attributes listed in the
above entry are meaningless to the FreeTDS ODBC driver.  

> 2. Where would I find descriptions of error codes, like SQLSTATE=8001 

For all intents and purposes, Microsoft defines the ODBC standard.  The
documentation is included in their SDK, available online.  

> 3. Why are the UID/PWD command line arguments needed when Username and

> Password are in already the odbc.ini file?

See Table 4-1 again.  The last column indicates whether or not the
attribute is read from odbc.ini.  You'll note that UID & PWD are listed
as "no", meaning the driver will accept those attributes only as part of
the connect string.  In the odbc.ini file, they are just line noise.  


The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.

More information about the FreeTDS mailing list