Create a shell to get data from SQL Server using FreeTDS

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi guys

I new in Unix and FreeTDS and need your help.

I install FreeTDS 0.82 to connect to SQL Server using the default install:

./configure -prefix=mypath
make
make install

Then I configure my freetds.conf like this:

# MyServer
[MyServer]
        host = xxx.xxx.xxx.xxx
        port = 1433
        tds version = 8.0

I test the connection with tds and the result is OK

# tsql -S myServer -U user -P password
locale is "C C C C C C"
locale charset is "roman8"
1>

Now I want to create a shell that connect to SQL Server using FreeTDS and 
write result data in a text file

How I write this shell? Which libraries I have to use? 

I need install unixOdbc to use libtdsodbc.so library or I can create the 
shell using only FreeTDS?

Thanks 

Daymel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.