From: Bolo Date: 2007-01-06T03:00:10+09:00 Subject: Re: ODBC, MS SQL Server Ok Know i have this error message irb(main):002:0> dbh = DBI.connect('dbi:ODBC:Corporate', '*******','**********') DBI::DatabaseError: S1000 (0) [unixODBC][FreeTDS][SQL Server]Unable to connect to data source from /usr/lib/ruby/1.8/DBD/ODBC/ODBC.rb:95:in `connect' from /usr/lib/ruby/1.8/dbi.rb:424:in `connect' from /usr/lib/ruby/1.8/dbi.rb:215:in `connect' from (irb):2 gregarican a �crit : > I think a reply message in that thread pertained to file access perms > on those odbc files. Check the two ini files and ensure that the perms > are botching things up. > > Bolo wrote: > > I don't the anwsers to his question > > > > my db definition > > $ nano /etc/odbc.ini > > > > [Corporate] > > Driver = FreeTDS > > Description = ODBC connection via FreeTDS > > Trace = No > > Servername = Corporate > > Database = FrontOffice > > > > > > nano /etc/odbcinst.ini: > > > > > > [FreeTDS] > > Description = TDS driver (Sybase/MS SQL) > > Driver = /usr/lib/odbc/libtdsodbc.so > > Setup = /usr/lib/odbc/libtdsS.so > > CPTimeout = > > CPReuse = > > FileUsage = 1 > > > > > Hmmm. And you have UNIX ODBC loaded then I would assume too. Here's a > > > thread I googled across in terms of Debian UNIX ODBC access --> > > > http://mail.easysoft.com/pipermail/unixodbc-support/2004-November/000237.html. > > > Perhaps it might apply to you? > > > > > > Bolo wrote: > > > > Hello, Hello > > > > > > > > > This might sound silly, but are you using a Windows-based PC? > > > > > > > > No I use Debian etch. When i this command > > > > > > > > # isql YOUR_DB_DEFINITION_NAME USERNAME PASSWORD > > > > +---------------------------------------+ > > > > | Connected! | > > > > | | > > > > | sql-statement | > > > > | help [tablename] | > > > > | quit | > > > > | | > > > > +---------------------------------------+ > > > > SQL> select * from users; (again, do this for a table that exists in > > > > your db) > > > > +------------+-------------------------------+ > > > > | id | login | > > > > +------------+-------------------------------+ > > > > | 1 | user1 | > > > > | 3 | user2 | > > > > +------------+-------------------------------+ > > > > 2 rows affected > > > > 2 rows returned > > > > SQL> quit > > > > > > > > it's working