bypassing /etc/freetds.conf or interfaces file
camber at ais.org
Thu Dec 13 10:54:51 EST 2001
Ok, the non-portable (as in don't expect this to work on OpenClient or
MS's stuff), is:
Compile FreeTDS with the desired version using the --with-tdsver=x.x
configure flag. I'll assume this is for MS SQL, so let's say it's 7.0 for
Now do everything like normal but use the DNS name of the host on which
the database lives as the server name. As long as the SQL Server is
listening on prot 1433, this will work.
If you are using Sybase or MS SQL is not on 1433 put in a call like this:
just prior to calling ct_connect() where con is the pointer returned from
ct_con_alloc() and 4000 is the port number the server is listening at.
If you also need for some reason to change the TDS protocol version have a
look at tds_set_version() also in src/tds/login.c and make a similiar call
Changing the port number can also be done at runtime by using the TDSPORT
environment variable. Legal values are 4.2, 5.0, and 7.0.
On Tue, 11 Dec 2001, David Nahman wrote:
> I'm using the ctlib interface (ct_connect, etc).
> > It is possible, which API are you using?
> > Brian
> You are currently subscribed to freetds as: [camber at ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
More information about the FreeTDS