Hey

Ok, got this working. I think my tired brain is just not quick enough. For 
reference, I had an extra / in the connection string, causing sequel to try 
to connect to "/MyODBCName" instead of just "MyODBCName".

The connect call in the end:

Sequel.connect('odbc:/MyODBCName', db_type: 'mssql') do |db|
end

J

On Wednesday, 13 August 2014 06:08:00 UTC+2, Jurgens du Toit wrote:
>
> Hey
>
> Here's the full error and stack trace. Connecting without the db_type 
> connects fine, it's only when I add :db_type => 'mssql' as an option that 
> this happens.
>
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/odbc.rb:33:in
>  
> `autocommit=': ODBC::Error: INTERN (0) [RubyODBC]No connection 
> (Sequel::DatabaseConnectionError)
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/odbc.rb:33:in
>  
> `connect'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool.rb:96:in
>  
> `make_new'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:158:in
>  
> `make_new'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:137:in
>  
> `available'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:127:in
>  
> `block in acquire'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:194:in
>  
> `block in sync'
>     from <internal:prelude>:10:in `synchronize'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:194:in
>  
> `sync'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:126:in
>  
> `acquire'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/connection_pool/threaded.rb:94:in
>  
> `hold'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/database/connecting.rb:250:in
>  
> `synchronize'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/shared/mssql.rb:199:in
>  
> `server_version'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/shared/mssql.rb:706:in
>  
> `server_version'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/shared/mssql.rb:806:in
>  
> `is_2005_or_later?'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/shared/mssql.rb:710:in
>  
> `supports_cte?'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/dataset/sql.rb:1436:in
>  
> `select_with_sql'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/dataset/sql.rb:224:in
>  
> `select_sql'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb:12:in
>  
> `select_sql'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/adapters/shared/mssql.rb:700:in
>  
> `select_sql'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/dataset/actions.rb:139:in
>  
> `each'
>     from E:/WWW/Development/xmlrpc_shipper/shipper.rb:4:in `block in 
> <main>'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/database/connecting.rb:69:in
>  
> `connect'
>     from 
> D:/Ruby/lib/ruby/gems/1.9.1/gems/sequel-4.13.0/lib/sequel/core.rb:95:in 
> `connect'
>     from E:/WWW/Development/xmlrpc_shipper/shipper.rb:3:in `<main>'
>
> J
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to