Ruby DBI Error

G

gregarican

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,212
Latest member
BrennaCaba

Latest Threads

Top