[freetds] FreeTDS and Ubuntu, iodbc

Dan Mohn mohnd at egolfscore.com
Tue Apr 3 16:01:25 EDT 2007


OK.  Thank you.  After some struggles I have it working now.

My problem was that I was having problems operating iodbcadm-gtk, so I
just manually edited the odbc.ini.

In freetds.conf I have;

[eGolfScoreTDS]
	host = <myipaddress>
	port = 1433
	tds version = 8.0
	timeout = 10
	connect timeout = 10

In odbc.ini I have;

[ODBC Data Sources]
eGolfScore Prod = FREETDS Connection

[eGolfScore Prod]
Driver          = /usr/local/freetds/lib/libtdsodbc.so
Description     = eGolfScore Prod
Trace           = No
Servername	= eGolfScoreTDS
Database        = eGolfScore
UID             = <userid>
pwd             = <password>

Now everything connects ok.  I will note that with the pre-packaged
freetds, I was able to do a DSN-less connection, but with the same
setting I no longer seem to.  But that could just be my lack of
understanding.

My issue at this point is that things have only slightly improved.  When
I disconnect from the network, the application still does not timeout.
However, I have noticed that if I wait 1 min, or 15 min, or longer and
re-establish the network connection, the application will then catch an
odbc error.  I am using RealBasic 2007r1 to access ODBC.  I will also
note, that on MSWin with the sql server odbc driver, my application does
time out.

So my question.  How do I go about debugging what the issue is? and is
this the place to get help at this point?

Again, any help is appreciated.

Dan

On Mon, 2007-04-02 at 12:00 -0400, freetds-request at lists.ibiblio.org
wrote:
> Dan Mohn wrote:
> > First, I currently have FreeTDS .63 and iODBC 3.52.4 installed on
> Ubuntu
> > 6.10. Everything runs fine, except, the timeout issue I have been
> > reading about. In my application this is a real issue. So, I want to
> > create a build of the current nightly build 20070401. I uninstalled
> the
> > FreeTDS .63 I had installed. Moved the download to a folder and run
> > ./configure, make, make install. After figuring out a few dev
> packages I
> > needed installed, it now seems to build without errors. I then use
> > iodbcadm-gtk to point to the new libtdsodbc.so file that was created
> > from my build. Now when I run my application (RealBasic using ODBC)
> I
> > get "Unable to Connect to Datasource".  I run "tsql -S my.server.ip
> -U
> > myusername -P mypassord" and it tells me "There was a problem
> connecting
> > to the server".
> 
> Where is your freetds.conf?  I suspect your snapshot build is looking
> for
> it in a different place. 
> 
> You may find that your 0.63 package was configured with
> --prefix=/usr/local/freetds (I think that was the default back then),
> causing your freetds.conf to be located in /usr/local/freetds/etc.
> That
> was changed quite awhile ago; the default now is /usr/local/etc:
> 
> $ tsql -C
> Compile-time settings (established with the "configure" script)
>                             Version: freetds v0.65.dev.20060920
>              freetds.conf directory: /usr/local/etc
>                                    [...]
> 
> You can do one of three things:
> 
> 1.  move freetds.conf to /usr/local/etc.
> 2.  use an environment variable (not recommended except for testing).
> 3.  reconfigure with the old prefix.
> 
> You're going in the only direction possible if you want corrected
> timeout
> handling.  ;-)
> 
> HTH. 
> 
> --jkl
> 


More information about the FreeTDS mailing list