Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "Alf C Stockton" <alf AT stockton.co.za>, "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Cc:
  • Subject: RE: [freetds] Re: FreeTDS Digest, Vol 22, Issue 19
  • Date: Sat, 13 Nov 2004 10:26:13 +0100


>
> 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@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




Archive powered by MHonArc 2.6.24.

Top of Page