> -----Original Message-----
> From: gregarican [mailto:greg.kujawa / gmail.com] 
> Sent: Monday, August 08, 2005 12:51 PM
> To: ruby-talk ML
> Subject: Ruby DBI Error
> 
> 
> I have been using Ruby v1.8.2 with DBI v1.42 for awhile now 
> and it has been pretty much smooth sailing. There is a new 
> SQL Server 2000 database I am attempting to connect to and 
> persistently get connection errors using Ruby DBI. Here is a 
> snippet of the connection string I'm
> trying:
> 
> DBI.connect('DBI:ADO:Provider=SQLOLEDB;Connect Timeout=5;Data 
> Source=sawmill-arms;Initial Catalog=dbsARMS_B01;Persist 
> Security Info=True;User ID=sa;Password=xxxxxxx165;')
> 
> Here is the error I am receiving:
> 
> OLE error code:80040E4D in Microsoft OLE DB Provider for SQL Server
>       Login failed for user 'sa'.
>     HRESULT error code:0x80020009
>       Exception occurred.	from
> c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in `connect'
> 	from c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in `connect'
> 	from monthlyCommissions.rb:3
> 
> This database requires SQL security so I can't get it to 
> Windows integrated security. There are other databases I 
> connect to using either Windows or SQL security without 
> incident. The connection string has only been changed in this 
> post where I made x's rather than the characters in the password.
> 
> I can log into the database fine using these credentials in 
> another OLE DB application. In this case it is Crystal 
> Reports. Any ideas why Ruby DBI isn't working for me?

This looks like a (Ruby?) OLE and/or ADO driver issue, not an error with
DBI specifically.

Google for "HRESULT error code:0x80020009" or "OLE error code:80040E4D"
- I think you'll get some potentially helpful hints.

Regards,

Dan