Hi everybody,
years ago I created a database application that uses a SQL server backend on the local computer. This was on a machine with Win XP. Now I wanted to run that application again, but on a different machine - having Win 7. At startup the application checks if the SQL server is running (because normally it doesn't). If not, it is started by the ServiceController start command (sc.Start()) without any parameters, I might add. But that command throws an exception now:
"A first chance exception of type 'System.InvalidOperationException' occurred in System.ServiceProcess.dll"
HResult -2146233079. "The service MSSQL$SQLEXPRESS cannot be opened on computer .". :confused: (I replaced the dot by the computer name but no effect).
I tried that with other services too - without success. Then I thought it might be related to my restricted user privileges (handled in a different way on Win 7) and I ran the application "as administrator". Again no effect.
Does anybody know the trick?
years ago I created a database application that uses a SQL server backend on the local computer. This was on a machine with Win XP. Now I wanted to run that application again, but on a different machine - having Win 7. At startup the application checks if the SQL server is running (because normally it doesn't). If not, it is started by the ServiceController start command (sc.Start()) without any parameters, I might add. But that command throws an exception now:
"A first chance exception of type 'System.InvalidOperationException' occurred in System.ServiceProcess.dll"
HResult -2146233079. "The service MSSQL$SQLEXPRESS cannot be opened on computer .". :confused: (I replaced the dot by the computer name but no effect).
I tried that with other services too - without success. Then I thought it might be related to my restricted user privileges (handled in a different way on Win 7) and I ran the application "as administrator". Again no effect.
Does anybody know the trick?