# ODBC Error: dyld: Symbol not found: \_SQLConfigDataSource

**URL:** <https://www.ruby-forum.com/t/odbc-error-dyld-symbol-not-found-sqlconfigdatasource/125883>\
**Category:** Ruby\
**Created:** [January 13, 2008, 10:15am UTC](https://www.ruby-forum.com/t/odbc-error-dyld-symbol-not-found-sqlconfigdatasource/125883 "2008-01-13T10:15:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a4c791/32.png) [@Diego\_B](https://www.ruby-forum.com/u/Diego_B)\
**Post date:** [January 13, 2008, 10:15am UTC](https://www.ruby-forum.com/t/odbc-error-dyld-symbol-not-found-sqlconfigdatasource/125883/1 "2008-01-13T10:15:54Z")

</div>

Hi all,

I am trying to use DBI to connect from OS X to a SQL Server Database  
running under Windows XP. When trying the following in irb:

require ‘rubygems’  
require ‘dbi’  
DBI.connect(‘DBI:ODBC:MY\_DAN’, ‘sa’, ‘password’)

I get the following error:

dyld: NSLinkModule() error  
dyld: Symbol not found: \_SQLConfigDataSource  
Referenced from: /usr/local/lib/ruby/site\_ruby/1.8/i686-darwin8.10.1/  
odbc.bundle  
Expected in: flat namespace  
Trace/BPT trap

And irb crashes out and I’m thrown back on to the command line. I can  
connect to the SQL Server database from tsql and iodbctest, so that’s  
working fine. Just not able to do so from DBI. Has anyone else had  
this problem and could possibly shed some light on what a solution may  
be?

Thank you.

Regards,  
Diego

---

<div class="post-metadata">

**Author:** ![Diego\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a4c791/32.png) [@Diego\_B](https://www.ruby-forum.com/u/Diego_B)\
**Post date:** [January 17, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/odbc-error-dyld-symbol-not-found-sqlconfigdatasource/125883/2 "2008-01-17T17:51:28Z")

</div>

> I am trying to use DBI to connect from OS X to a SQL Server Database  
> running under Windows XP. When trying the following in irb:
> 
> require ‘rubygems’  
> require ‘dbi’  
> DBI.connect(‘DBI:ODBC:MY\_DAN’, ‘sa’, ‘password’)

Hi Diego,  
I didn’t use SQL Server from Unix so far, but I think you can use direct  
driver. I think direct driver to MSSQL is contained in Ruby, but I’m not  
100% sure. If yes, please use connection string like this:  
‘DBI:mssql:…’, where the last part should be described in driver doc.
