Login Problem ??

  • Hi !!!

    I am connecting to SQL SERVER with following code :-

    Set SQLInstance = New SQLDMO.SQLServer

    ' Log in

    SQLInstance.LoginSecure = True

    SQLInstance.Connect "serverName","userid","pwd"

    This code works proprerly if the server is already on,but if server is off I get error

    Can anyone suggest any method to detect whether Server is on or off.

    Thanx

    SP

  • Wrap up your code in a Try, Catch block

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply