# Dbi odbc problem

**URL:** <https://rubytalk.org/t/dbi-odbc-problem/69133>\
**Category:** ruby-talk\
**Created:** [11 February 2014 19:13 UTC](https://rubytalk.org/t/dbi-odbc-problem/69133 "2014-02-11T19:13:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [11 February 2014 19:13 UTC](https://rubytalk.org/t/dbi-odbc-problem/69133/1 "2014-02-11T19: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
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [13 February 2014 21:32 UTC](https://rubytalk.org/t/dbi-odbc-problem/69133/2 "2014-02-13T21:32:41Z")

</div>

bump..

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