hi nidhi,
In odbc.ini instead of Servername use Server as shown below.
odbc.ini..
.............
.....
[MySql65]
Driver = MYTDS
Description = ODBC connection via FreeTDS
Trace = Yes
TraceFile = /tmp/mysql.log
Server = 65.182.161.193
Database = agent
Port = 3306
User = add valid username here
Nidhi, FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.
http://www.freetds.org
and also while compiling link odbc library not tdsodbc.
Ex: gcc -I<whatever_path> your_program.cpp -o your_program -L<lib_path> -lodbc
try this and let me know.
regards
Gourav