Re: Using freetds in Windows

"Andrew H. Wakefield" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <1262980810.2976.19.camel@uwake-laptop>
It also occurred to me that I should have included the freetds.conf
file. Here is the link to that file:

http://home.earthlink.net/~a_wake/freetds.conf


Andy Wakefield
[email protected] 

On Fri, 2010-01-08 at 01:21 -0500, Andrew H. Wakefield wrote:

> As a follow-up -- I had indicated earlier (and you can see in the old
> posts included below) that getting the environment variable to point to
> the correct freetds.conf file had allowed me to use tsql with the -S
> parameter. I don't know why it now has suddenly quit working that way!!
> 
> Andy Wakefield
> [email protected] 
> 
> On Fri, 2010-01-08 at 01:19 -0500, Andrew H. Wakefield wrote:
> 
> > Still having problems with freetds 0.82 running under Windows ... here
> > is the latest symptom:
> > 
> > Using tsql, I can connect to the SQL database if I specify the Host and
> > port directly. If I specify the Server name, *even though it is finding
> > the freetds.conf file and translating to the correct IP address and
> > port*, it errors out. Let me make it clear: According to the log file
> > generated with TDSDUMPCONFIG, it *IS* finding the freetds.conf file, and
> > according to the TDSDUMP log file, it *IS* translating to the right IP
> > address and port. But for some reason, it errors out.
> > 
> > Here is a link to the log file:
> > http://home.earthlink.net/~a_wake/freetds.log
> > 
> > You will see three sets of results in the log file. The first is when I
> > connected (successfully) using tsql with the -H and -p parameters. The
> > second is when I attempted to connect using the -S parameter. As you can
> > see from the log file, it is translating to the same IP address ... but
> > then it errors out. The final set is generated by a program that I am
> > attempting to write using wxWidgets and DatabaseLayer. It generates a
> > different error, but at the same point in the process -- don't know if
> > it is related or completely different.
> > 
> > I'm new enough to freetds that I am not sure of the significance of what
> > I'm seeing in the log file. For example, in the first two sets of data,
> > the initial attempt to connect seems to return an error
> > (tds_open_socket: connect(2) returned "Unknown error") -- but in the
> > first set, it then goes ahead and connects successfully, while in the
> > second set it then goes into an error mode and quits.
> > 
> > Help!!!
> > 
> > 
> > 
> > Andy Wakefield
> > [email protected] 
> > 
> > 
> > 
> > > > On Thu, 2009-12-31 at 06:30 -0500, Paul Thurston wrote:
> > > > > On Windows, if your using v0.82, you'll need to set the environment
> > > > > variable FREETDSCONF to point to your freetds.conf file.
> > > > > 
> > > > > Also, remember to escape the file path sequence as follows: SET
> > > > > FREETDSCONF=C:\\Apps\\FreeTDS\\etc\\freetds.conf
> > > > > 
> > > > > In the freetds.con file itself, make sure that line host=<Address> is
> > > > > a valid IP address to the database server.
> > > > >
> > > > Andrew H. Wakefield wrote:
> > > > Paul, many thanks -- that took care of the problem with tsql. Now I just
> > > > need to figure out what my program is doing differently from tsql, and
> > > > maybe I'll finally get this show on the road ...
> > > 
> > > Andrew, remember TDSDUMPCONFIG will show where config.c is looking for
> > > your freetds.conf, and the final communication parameters for the
> > > connection.  
> > > 
> > > The sample programs and unit tests may serve as examples for your own
> > > application.  
> > > 
> > > HTH.  
> > > 
> > > --jkl
> > > 
> > _______________________________________________
> > FreeTDS mailing list
> > [email protected]
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
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.