From: Nick Drochak Date: 2001-01-10T15:36:51+09:00 Subject: [ruby-talk:8990] Re: Database access with ADO Not sure if this will help, but try to include both the provider and the DB name in the connection string. Like this: oConn.ConnectionString="PROVIDER=MSDASQL;DSN=xxxxx;uid=xxxx;pwd=xxxx;databas e=xxxxx" Best regards, Nick Drochak Chief Technology Officer MCDBA & MCSE ----------------------------- JobDragon K.K. +813-5775-1958 (direct) +813-5775-1951 (main) +813-5775-1952 (fax) mailto:nick@jobdragon.com http://www.jobdragon.com ----------------------------- -----Original Message----- From: David Naseby [mailto:dnaseby@affinityforbusiness.com] Sent: Wednesday, January 10, 2001 12:22 PM To: ruby-talk ML Subject: [ruby-talk:8976] Re: Database access with ADO Thanks for the quick response, but I tried this code > From: Ernest Ellingson [mailto:erne@powernav.com] > require 'win32ole' > oConn=WIN32OLE.new('ADODB.Connection') > oConn.ConnectionString="DSN=xxxxx;uid=xxxx;pwd=xxxx" > oConn.Open > rs=oConn.Execute("SQLString") (of course, substituting the xxxxx and SQLString), and I got the following error: ado2.rb:4:in 'method missing': Open (RuntimeError) OLE rb_compile_error:80004005 in Microsoft OLE DB Provider for ODBC Drivers [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Exception occurred from ado2.rb:4 The code worked (with the usual conversions) in a VBScript file. David Naseby