[freetds] Re: FreeTDS Digest, Vol 22, Issue 19

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Sat Nov 13 04:26:13 EST 2004


> 
>   From: "Lowden, James K" <LowdenJK at bernstein.com>
>   Subject: RE: [freetds] freetds-0.62.3 & unixODBC-2.2.8
> >>
> >> I am having a problem understanding how to incorporate freetds into
> > unixODBC and
> >> as I have a sample C program that is failing to connect to 
> MS SQL on a
> > remote
> >> server I am a little lost.
> >
> > First install unixODBC, then build and install FreeTDS.  
> Then link your
> > C program with those libraries.
> >
> > Where exactly are you having difficulty?
> >
> What should the DNS look like when I am trying to connect 
> from my C application 
> on Linux with MS SQL database Jack2 table jackpot_register on 
> server K9Pad ?
> 
> I am also having a problem understanding the relationship 
> between unixODBC & 
> freetds. I thought that freetds was a driver that had to be 
> built into unixODBC 
> but from what you say these are two seperate libraries and 
> are only "joined" 
> when linked into the program.
> 
> I compile with gcc odbc.c -o odbc -lodbc -ltds
> & then run the program

No, this is wrong. Only -lodbc, libodbc then load dynamically libtdsodbc
(not libtds !!!)

> alf at puppypad:~/dev$ odbc
> About to SQLConnect()
> Error SQLConnect -1
> [unixODBC][Driver Manager]Data source name not found, and no 
> default driver 
> specified (0)
> 
> The "About to SQLConnect()" is from a printf in my program.
> 

freddy77



More information about the FreeTDS mailing list