Click here to Skip to main content
15,901,205 members

Comments by borzola7 (Top 5 by date)

borzola7 29-Oct-13 13:27pm View    
In the event log the service gives this error message: System.Data.SqlClient.SqlException (0x80131904): "The service can't start. The SELECT permission was denied on the object 'Company', database 'comp', schema 'dbo'."
borzola7 29-Oct-13 13:27pm View    
In the event log the service gives this error message: System.Data.SqlClient.SqlException (0x80131904): "The service can't start. The SELECT permission was denied on the object 'Company', database 'comp', schema 'dbo'."
borzola7 29-Oct-13 13:14pm View    
When I try to run service: "The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs"

The replacement helped a little, but now "SqlDataReader reader = command.ExecuteReader();" causes the same message.
In the event log: A szolgáltatás nem indítható el. System.Data.SqlClient.SqlException (0x80131904): "The service can't start. The SELECT permission was denied on the object 'Company', database 'comp', schema 'dbo'."
borzola7 29-Oct-13 11:09am View    
Deleted
well I am not skilled enough to debug.
SqlConnection con = new SqlConnection(connectionString);
con.Open();
But I know that con.Open() causes the problem which shuts down service, it doesn't even start.
borzola7 29-Oct-13 10:55am View    
I am beginner so apologize me. How do you make sql login? If I start SQL Server Management Studio I always connect to localhost (servername), I don't know other way.
How do you connect your database to be accessable for window service with a connectorString like this: "server=ABC\\SQLEXPRESS; database=db1; uid=sa; password=sa" (I have seen it in a windows service example)