Results 1 to 7 of 7

Thread: VB6 - Know if MSSQLS is running, restart MSSQLS (...)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Lightbulb VB6 - Know if MSSQLS is running, restart MSSQLS (...)

    I was checking the forums for a way to find out if MSSQL Server was running and a way to know how to start MSSQL Server... Why? So I could start it if it was stopped.

    As you can imagine, I didn't find any way at all, but I found a lot of questions about how to do it and none of them had an answer. So I took my time, found an approach to do it and now I would like to share it. Here is a list of what you can do with the module modSQLServerCmd:

    1.- Know if MSSQL Server is running
    2.- Start MSSQL Server
    3.- Restart MSSQL Server
    4.- Start MSSQL Server if MSSQL Server is not running

    In the attached project you can find a status picture that gives you the sensation of using the Service Manager and an example of how to use some of the features listed before.

    Yes, all of these functions will take some time to be executed... Why? Well, they all have to wait on the results and thus they depend on how long it takes MSSQL Server to respond.

    Feel free to comment about it. If you have a better way to do this, please share it with all of us...
    Attached Files Attached Files
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width