From: Charles Calvert Date: 2010-10-30T03:25:19+09:00 Subject: Re: Database connection String Using 'win32ole' On Fri, 22 Oct 2010 17:16:08 -0500, Ruby Mania wrote in : >Thanks , IT Works. I modified it to: > >connection_string = "Provider=SQLOLEDB.1;" >connection_string << "Persist Security Info=False;" >connection_string << "Initial Catalog=#{database};" >connection_string << "Data Source=#{@host};" >connection_string << "Trusted_Connection=Yes;" >connection = WIN32OLE.new('ADODB.Connection') To clarify, using the trusted connection attribute in the connection string is equivalent to using "Integrated Security=SSPI". It causes the connection to be authenticated using the Windows credentials of the account that started the program making the connection. Your original attempt to embed the username and password in the string caused SQL Server to attempt to authenticate the connection using the SQL Server account with that username. This article might be useful . It's aimed as ASP.NET and SQL Server 2000, but much of the information should still be applicable. -- Charles Calvert | Software Design/Development Celtic Wolf, Inc. | Project Management http://www.celticwolf.com/ | Technical Writing (703) 580-0210 | Research