Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alf C Stockton <alf AT stockton.co.za>
  • To: freetds AT lists.ibiblio.org, "Lowden, James K" <LowdenJK AT bernstein.com>, Development issues and topics for unixODBC <unixodbc-dev AT easysoft.com>
  • Cc:
  • Subject: [freetds] Re: FreeTDS Digest, Vol 22, Issue 19
  • Date: Fri, 12 Nov 2004 20:33:44 +0000 (UTC)

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

---

Regards,
Alf Stockton www.stockton.co.za

"Dying is a very dull, dreary affair. And my advice to you is to have
nothing whatever to do with it."
-- W. Somerset Maugham




Archive powered by MHonArc 2.6.24.

Top of Page