If you are using a unix-client probably you should have installed the
unixODBC driver in your OS.
If you are trying to connect to MS-SQL server with ODBC adapter you
should use (you may omit parentheses)
####
Sequel.odbc('db_name', :user => 'some_user', :password =>
'some_pwd', :host => 'server_name', :db_type=>'mssql')
####

You may also try to connect using the ADO adapter from a Windows
client (ADO uses WIN32OLE). ADO works fine.
####
DB = Sequel.ado 'db_name', :user => 'some_user', :password =>
'some_pwd', :host => 'server_name'
####

Vag
On Apr 5, 5:55 am, Jim Knowlton <[email protected]> wrote:
> Can someone help me with how to connect via ODBC?  There are examples
> for other db adapters, but not ODBC.  Here is what I've tried:
>
> require 'sequel'
>
> DB = Sequel.odbc
> DB.connect("odbc_connection_name")
>
> When I try this, I get an error:
>
> ODBC::Error: INTERN (0) [RubyODBC]No connection
>         from c:/ruby/lib/ruby/gems/1.8/gems/sequel-2.12.0/lib/sequel/
> adapters/odbc.rb:39:in `autocommit='
>         from c:/ruby/lib/ruby/gems/1.8/gems/sequel-2.12.0/lib/sequel/
> adapters/odbc.rb:39:in `connect'
>         from (irb):14
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to