let the linux programm connect to mssqlserver, install the third library - freetds.
here are the steps to make it work, don't ask why, just have a try.
1,setup unixODBC
./configure --prefix=/user/local/unixODBC
make
make install
2,setup freetds
./configure --prefix=/user/local/freetds --with-unixodbc=/user/local/unixODBC --with-tdsver=8.0 --enable-gui=no --enable-msdblib
make
make install
3,configure freetds
vi etc/freetds.conf
[MyServer2k5]
host = 192.168.90.5
port = 1433
tds version = 8.0
client charset = GBK
./freetds/bin/tsql -S MyServer2k5 -H 192.168.90.5 -p 1433 -U sa -P 123456
./freetds/bin/tsql -S MyServer2k5 -U sa -P 123456 -D test
4,configure unixODBC
vi etc/odbcinst.ini
[TDS]
Description = MS-SQL Server
Driver = /user/local/freetds/lib/libtdsodbc.so
Setup = /user/local/freetds/lib/libtds.so
FileUsage = 1
vi etc/odbc.ini
[test];DSN
Driver = TDS
Servername = MyServer2k5
Server = 192.168.90.5
Database = test
Port = 1433
Socket =
Option =
Stmt =
vi /root/.odbc.ini
[test]
Driver = TDS
Servername = MyServer2k5
Server = 192.168.90.5
Database = test
Port = 1433
./unixODBC/bin/isql -v test sa 123456
code come last...