From: Petr Fischer Date: 2002-03-06T01:40:23+09:00 Subject: Re: ODBC/drivers for MS-SQL You can use WIN32OLE extension (from RAA) and access MS-SQL (and other databases; yes ODBC too) directly via. Microsoft ADO. Usage is very simple and powerfull (but only for MS Windows world). Example: ------------------------------------------- require 'win32ole' conn = WIN32OLE.new('ADODB.Connection') conn.Open("Provider=MSDASQL.1;Persist Security Info=False;Data Source=ODBC-IB") // change "connection string" for your DB rset = WIN32OLE.new('ADODB.Recordset') rset.ActiveConnection = conn rset.Open("select * from anytable") while not rset.EOF do s = "" for i in (0..rset.Fields.Count - 1) do s += ', ' if i > 0 s += rset.Fields.Item(i).Value.to_s.strip end puts s rset.MoveNext end ------------------------------------------- On Tue, 5 Mar 2002 10:30:12 +0200, "Douglas J van Vliet" wrote: > Is there a module available for accessing MS-SQL? > > Whether we like it or not, Microsoft is here to stay. Most of my clients > use MS products (MS-95/98/NT 4.0/2000) and if I want to keep them, I need to > use Windows. > > Dougie > >