Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

determine if SQL Server is running

Status
Not open for further replies.

NightZEN

Programmer
Joined
Apr 29, 2003
Messages
142
Location
US
I am trying to determine, via vba, if ther SQL server is running or available. Does anyone have an easy method to do this? I am writing a routine to handle either the SQL Server being down, or the user running the database off the network (ie, a laptop on the road).

Thanks for any thoughts or ideas!
 
In your code, try attaching to a database table on the SQL server. Use error handling to catch the error code if the server is down, and take appropriate action.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top