# ODBC query

**URL:** <https://rubytalk.org/t/odbc-query/58824>\
**Category:** ruby-talk\
**Created:** [8 June 2010 23:21 UTC](https://rubytalk.org/t/odbc-query/58824 "2010-06-08T23:21:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_George](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Brian\_George](https://rubytalk.org/u/Brian_George)\
**Post date:** [8 June 2010 23:21 UTC](https://rubytalk.org/t/odbc-query/58824/1 "2010-06-08T23:21:17Z")

</div>

I'm attempting to connect to a database via ODBC connection.  
I have the following gems installed:  
dbi-0.4.3  
dbd-odbc-0.2.5

I'm attempting to connect to an odbc connection with the name  
'IRVQA-AUTO2'

irb(main):001:0\> require 'DBI'  
C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/lib/DBI.rb:93:  
warning: already initialized constant VERSION  
C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/lib/DBI.rb:96:  
warning: already initialized constant API\_VERSION  
C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/lib/DBI.rb:100  
: warning: already initialized constant DEFAULT\_TRACE\_MODE  
C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/lib/DBI.rb:101  
: warning: already initialized constant DEFAULT\_TRACE\_OUTPUT  
=\> []  
irb(main):002:0\> conn =  
DBI.connect("DBI:ODBC:IRVQAAUTO2","poweruser","nexaqa")  
DBI::InterfaceError: Unable to load driver 'ODBC' (underlying error:  
uninitializ  
ed constant DBI::DBD::ODBC)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/l  
ib/DBI.rb:300:in `load\_driver'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/l  
ib/DBI.rb:242:in `load\_driver'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/l  
ib/DBI.rb:160:in `\_get\_full\_driver'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Documents and  
Settings/bgeorge/.bundle/ruby/1.8/gems/dbi-0.4.3/l  
ib/DBI.rb:145:in `connect'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2

Any ideas what my downfall may be?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
