The SQL Auth. should work if the connect string is correct. Also check that
the Authentication for the target SQL Server is set to "SQL Server and
Windows" and not "Windows only".
Windows Auth. will give you a problem if the service runs under the Local
System account (local for the computer with the service installed), it is
unknown to the remote SQL Server. To get this to work, right click on the
service and change the Log On account of the service to be some network
account that has rights on the local computer as well as the SQL Server.
"Evan Camilleri" <ev**@holistic.com.mt.nospam> wrote in message
news:#2**************@TK2MSFTNGP12.phx.gbl...
I have a problem for a Windows Service to login on an SQL server
(different machine) - neither Windows Authentication nor SQL Authentication worked.
LOGIN FAILED FOR USER sa (for example).
If SQL Server is on the same PC of the Windows Service the connection
works OK.
The same code works in a Windows Form using same user and authentication
methods to the SQL Server on a different machine.
Thanks for any help!
Evan Camilleri