From: johnf Date: 2006-08-15T00:45:09+09:00 Subject: strange dbi Hi, First I'm a newbie to ruby. I'm using SUSE 10.0, ruby 1.8.2, dbi, freetds, unixODBC. I'm just testing access to a MS SQL 2000 database. I also posted this on the forum but no one responsed for two days. code: require 'dbi' db = DBI.connect('dbi:ODBC:mssql','username','password') rows = db.select_all("select * from arcust") error messages: /usr/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:239:in `fetch': INTERN (0) [RubyODBC]No data found (DBI::DatabaseError) from /usr/lib/ruby/site_ruby/1.8/dbi.rb:995:in `fetch_all' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:994:in `loop' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:994:in `fetch_all' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:759:in `fetch_all' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:515:in `select_all' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:511:in `execute' from /usr/lib/ruby/site_ruby/1.8/dbi.rb:511:in `select_all' from rubytest.rb:4 However, if I change the sql statement to: rows = db.select_all("select custno,company from arcust") ALL WORKS. Does anyone have any thoughts regarding why this is happening? John