[freetds] FreeTDS and Ubuntu, iodbc

Dan Mohn mohnd at egolfscore.com
Mon Apr 16 16:55:49 EDT 2007


OK.  I ran iodbctest, but it doesn't seem to allow me to run scripts so
I can pause it and pull out the cord.

I tried bsqlodbc, which when I just type the command tells me it accepts
the same parameters as bsqldb, but it results in;

/usr/local/freetds/bin/bsqlodbc -S <ip address> -U <user> -P <password>
-D <database> -i timeouttest.sql

bsqlodbc: error -1: SQLConnect: SQL_ERROR: failed
"[FreeTDS][SQL Server]Unable to connect to data source"

administrator at ubuntu-edgy:~$ /usr/local/freetds/bin/bsqlodbc
usage:  bsqlodbc 
        [-U username] [-P password]
        [-S servername] [-D database]
        [-i input filename] [-o output filename] [-e error filename]

I feel like I am missing something obvious.  I would think I should be
sending a connection string to bsqlodbc, but there isn't an option for
that.

What am I missing?



On Fri, 2007-04-13 at 22:46 -0400, James K. Lowden wrote:
> Dan Mohn wrote:
> > Ok.  I created a .sql file as follows;
> >
> > ----------begin
> [pretty SQL omitted]
> > ------------end
> >
> > For the first test, I set the tds timeout to 10 seconds.  It
> timeouts
> > with the following message;
> >
> > usr/local/freetds/bin/bsqldb -S <ipaddress> -U sa -P xxx -D dbname
> -i
> > timeouttest.sql
> > bsqldb: Msg 20003, Level 6
> > Adaptive Server connection timed out
> >
> > bsqldb:193: dbsqlok() failed
> ...
> > So it seems like freetds is timing out appropriately.  Is it
> possible
> > the messaging to the iodbc or realbasic layer is the problem?  Is
> there
> > a way I can test the odbc layer messaging somehow?
> 
> Thank you for conducting the test.  I'm happy we passed! 
> 
> I believe iodbc comes with a tool ('testodbc' or something like that)
> that
> runs arbitrary SQL.  You could use that or my bsqlodbc to test the
> ODBC
> layer. 
> 
> If that test succeeds, too, then you're looking at realbasic, about
> which
> I know nothing.  Or your application.  It might be that you need to
> trap
> errors in some special way or configure realbasic somehow to look for
> them. 
> 
> iodbc includes a trace facility that might be helpful to you.
> http://www.iodbc.org/index.php?page=docs/odbcstory
> 
> HTH. 
> 
> --jkl
> 
> 
> > On Tue, 2007-04-10 at 23:47 -0400, James K. Lowden wrote:
> > > Dan Mohn wrote:
> > > >  I am physically
> > > > unplugging the network cable.  Like;
> > > >
> > > > send sql statement
> > > > while not resultset eof
> > > > ---here I pull the network cable after a couple of rows have
> been
> > > read
> > > > ---get data
> > > > ---check for an timeout error
> > > > ---get the next row
> > > > loop
> > > >
> > > > Interestingly, after appx 2 hours, an error is trapped, and
> > > Realbasic is
> > > > reporting the following error message it claims is from the odbc
> > > driver;
> > > >
> > > > [FreeTDS][<drivername>]Communication link failure.
> > > >
> > > > What do you recommend I do for my next step?
> > >
> > > Hi Dan,
> > >
> > > Could you please execute the same test in bsqldb?  I would like to
> > > know if
> > > the problem is in FreeTDS or in some higher layer.  That won't
> > > necessarily
> > > exculpate FreeTDS, but it will tell us if FreeTDS is at least
> > > internally
> > > consistent.
> > >
> > > --jkl
> > >
> > >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS at lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> 
> 


More information about the FreeTDS mailing list