Skip to Content.
Sympa Menu

freetds - [freetds] dsn-less string for ruby dbi

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jon Connolly <jon AT dimax.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] dsn-less string for ruby dbi
  • Date: Wed, 4 Mar 2009 11:11:14 -0800

Hi, I am creating a user defined db connector for rails, which will allow
the user to connect to their db. Because of this, using the odbc.ini,
odbcinst.ini, and freetds.conf is not practical. To reiterate, this is a
connection in addition to the Active Record connection. The connection uses
Ruby's DBI library in the form of
DBI.connect('ODBC:MY_DSN', 'user', 'pass')
I would like to add the params string rather than use the freetds.conf and
the two ini files, but I am usure how to do this, or if it can even be done
using the ruby DBI.
I have tried
DBI.connect('ODBC:driver=path/to/driver;server=server;uid=user;pwd=secret
but this does not work. I also looked at the entry on the Freetds user
guide:
http://www.freetds.org/userguide/dsnless.htm#E.G.SAMPLEDSNLESS
Since I am not a C programmer I don't really know how I could use this.




Archive powered by MHonArc 2.6.24.

Top of Page