I am a Ruby newbie, drawn to the language by the DDJ article. I'm about to
start on my first decent project in the language, but I've encountered a few
problems with the (lack of) database support. I run on WinNT, using Ruby
1.6.1 installed by the windows installer.

My initial approach to databasing was to use the win32ole library to make an
ADODB-type connection - bypassing the need to go through an ODBC library
directly and letting COM do the work. The database is MS SQL, but that
shouldn't matter for ADO. The test code is below...

 require 'win32ole'
 records = WIN32OLE.new('ADODB.RecordSet')
 records.Open('SELECT * FROM PRODUCT;', 'FILEDSN=adotest.dsn')
 printf('%i\n',records.RecordCount)
 puts('press ENTER')
 gets
 records.Close

The output is rather ugly:
adotest.rb:3: [BUG] Segmentation fault
ruby 1.6.1 (2000-10-05) [i386-cygwin]
      0 [sig] ruby 1031 stackdump: Dumping stacktrace to ruby.exe.stackdump

This is the same error I get when attempting to run the excel1.rb sample
shipped with win32ole.

Is this a problem with the library or with what I'm attempting to do? Any
way around it?

Thanks,
David Naseby