From: Vani Kulkarni Date: 2007-07-30T21:44:18+09:00 Subject: Re: Connection String to MS SQL Server 2005 Hello Felix, I need to establish a connection to SQL Server 2005 on Windows. Thanks, Vani Felix Windt wrote: >> Following is the code written: >> >> rescue DBI::DatabaseError => e >> "Error IM002 (0) [Microsoft][ODBC Driver Manager] Data source >> > If you're attempting to connect via ODBC, you need to set up the ODBC > source > separately. > > On Linux, you would probably install FreeTDS and unixODBC, setting up > /etc/odbc.ini with an entry like this: > > [My_SQL2005_Server] > Driver = FreeTDS > Description = SQL2005 > Trace = No > Server = PRODSK0322 > Port = 1433 > Database = TestDB > > On Windows, I'm not sure how to set up the ODBC sources. > > Then you can connect with: > > dbh = DBI.connect("DBI:ODBC:My_SQL2005_Server", "sa", "!Sa123") -- Posted via http://www.ruby-forum.com/.