From: Ruby Mania Date: 2010-10-23T06:21:11+09:00 Subject: Database connection String Using 'win32ole' 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\ Password: whatever Error: OLE error code:80040E4D in Microsoft OLE DB Provider for SQL Server Login failed for user 'domain\'. Please help ! Thanks ton ! -- Posted via http://www.ruby-forum.com/.