E
Evan Camilleri
I am getting an exeception when I access an SQL database (on another
machine) from a 'Windows Service'. The same code works if the SQL Server is
local or code is in a Windows Application.
Following is exception from Event Viewer:
Event Type: Error
Event Source: TestServ
Event Category: None
Event ID: 0
Date: 05/11/2004
Time: 11:22:22 AM
User: N/A
Computer: VOYAGER
Description:
TestServ raised an Exception: System.Data.SqlClient.SqlException: Cannot
open database requested in login 'CRM'. Login fails.
Login failed for user 'sa'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at TestWindowsService.TestServ.OnStart(String[] args)
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
machine) from a 'Windows Service'. The same code works if the SQL Server is
local or code is in a Windows Application.
Following is exception from Event Viewer:
Event Type: Error
Event Source: TestServ
Event Category: None
Event ID: 0
Date: 05/11/2004
Time: 11:22:22 AM
User: N/A
Computer: VOYAGER
Description:
TestServ raised an Exception: System.Data.SqlClient.SqlException: Cannot
open database requested in login 'CRM'. Login fails.
Login failed for user 'sa'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at TestWindowsService.TestServ.OnStart(String[] args)
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.