My Connection String:
def open(database)
        # Open ADO connection to the SQL Server database
        connection_string =  "Provider=SQLOLEDB.1;"
        connection_string << "Persist Security Info=False;"
        connection_string << "User ID=#{@username};"
        connection_string << "password=#{@password};"
        connection_string << "Initial Catalog=#{database};"
        connection_string << "Data Source=#{@host};"
        connection_string << "Network Library=dbmssocn"
  @connection = WIN32OLE.new('ADODB.Connection')
  @connection.Open(connection_string)
end

The string gives error when I using the domain credentials. EG:

Username: domain\<username>
Password: whatever

Error:
OLE error code:80040E4D in Microsoft OLE DB Provider for SQL Server
Login failed for user 'domain\<username>'.

Please help !
Thanks ton !

-- 
Posted via http://www.ruby-forum.com/.