To Start the MSDE Service

G

Guest

Hi,

we are using MSDE as our Database

Now we have a Validation to check the MSDE availability

If Database Connectivity fails, I need to check the MSDE availability

If MSDE is not available(i.e., Service is stopped), then i have to Start the
Service thro' VB.Net Code

I need a Solution for it

Any Help will be appreciated

Thanks
Solution Seeker
 
K

Ken Tucker [MVP]

Hi,

Maybe this will help.

Dim s As System.ServiceProcess.ServiceController

For Each s In System.ServiceProcess.ServiceController.GetServices

If s.ServiceName = "MSSQLSERVER" Then

If s.Status = ServiceProcess.ServiceControllerStatus.Stopped Then s.Start()

End If



Ken

-------------------------

message Hi,

we are using MSDE as our Database

Now we have a Validation to check the MSDE availability

If Database Connectivity fails, I need to check the MSDE availability

If MSDE is not available(i.e., Service is stopped), then i have to Start the
Service thro' VB.Net Code

I need a Solution for it

Any Help will be appreciated

Thanks
Solution Seeker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top