# Dbi odbc problem

**URL:** <https://www.ruby-forum.com/t/dbi-odbc-problem/239096>\
**Category:** Ruby\
**Created:** [February 11, 2014, 8:13pm UTC](https://www.ruby-forum.com/t/dbi-odbc-problem/239096 "2014-02-11T20:13:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [February 11, 2014, 8:13pm UTC](https://www.ruby-forum.com/t/dbi-odbc-problem/239096/1 "2014-02-11T20:13:58Z")

</div>

Hello Everyone,

I’m currently trying to connect to a couple ODBC data sources via the  
DBI module. When trying to connect to the first source, everything works  
perfectly. When trying to connect to the second I receive the following  
error:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/dbd-odbc-0.2.5/lib/dbd/odbc/driver.rb:36:in  
‘rescue in connect’ : HY000 (1) Missing connection parameters  
(DBI:DatabaseError)

my code is as follows:

* * *

require ‘dbi’  
conn=DBI.connect(‘DBI:ODBC:my\_dsn\_name’,‘uid1’,‘pwd1’)

* * *

The first data source is a SQLExpress data source and the second is a  
jBASE data source.

Some extra info:  
I have also written a small module in VB that can connect without  
problems to both data sources using the VB ODBC library. However, when I  
try to connect using that module without specifying the DSN anywhere  
except for in the connection string, the same error is generated.

Any help would be appreciated!

Thanks

---

<div class="post-metadata">

**Author:** ![aaachilless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@aaachilless](https://www.ruby-forum.com/u/aaachilless)\
**Post date:** [February 13, 2014, 10:32pm UTC](https://www.ruby-forum.com/t/dbi-odbc-problem/239096/2 "2014-02-13T22:32:41Z")

</div>

bump…
