Hi. I'm trying to connect to a MSSQL Server using sequel on a linux
(Red Hat) machine. Everything is setup properly unixodbc, freeTDS,
odbc.ini, odbcinst.ini. If i connect using ODBC DSN:
Sequel.odbc(:database=>'db-odbc', :user=>'user', :password=>'pwd')
["Select 1"].each {|r| p r}
t works fine. But i don't want the configuration in odbc.ini files, i
need to manage it in the application. If i try to use DSN-less
connections
Sequel.odbc(:driver=>'{FreeTDS}', :servername=>'1.2.3.4', :port=>'1234',
:user=>'user', :password=>'pwd')
["Select 1"].each {|r| p r}
or event without the guards:
Sequel.odbc(:driver=>'{FreeTDS}', :servername=>'1.2.3.4', :port=>'1234',
:user=>'user', :password=>'pwd')
["Select 1"].each {|r| p r}
it fails with this error:
Sequel::DatabaseConnectionError: TypeError: can't convert false into
String
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/sequel-3.13.0/
lib/sequel/adapters/odbc.rb:36:in `drvconnect'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/sequel-3.13.0/
lib/sequel/adapters/odbc.rb:36:in `connect'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/sequel-3.13.0/
lib/sequel/database/misc.rb:44:in `initialize'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/sequel-3.13.0/
lib/sequel/connection_pool.rb:92:in `call'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/sequel-3.13.0/
lib/sequel/connection_pool.rb:92:in `make_new'
(...)
I googled A LOT, and can't find any more information about this. Is
there a way to make DSN-less connections using sequel? (http://
www.freetds.org/userguide/dsnless.htm)
I'm using freetds-0.64-6.el5, unixODBC-2.2.11-7.1, ruby-
enterprise-1.8.7-4, ruby-odbc (0.99991) and sequel (3.13.0)
Thanks,
Ricardo
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.