Ping SQL server in VB6.

5 pts.
Tags:
Network management software
Ping
VBA
Visual Basic
I need to use VB6 to detect if an SQL server is running. Looking for the easiest way whether it is pinging or something else or even detecting the database itself. Preferably by network device name.
ASKED: December 19, 2004  2:55 PM
UPDATED: October 23, 2013  6:23 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

To detect SQL Server running, you can do these steps:

  1. Add reference of Microsoft sqlobject library
  2. ListAvailableSQLServers properties gives you list of the server running

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Sonotsky
    It really depends on what you want to do, specifically. You can follow the above advice, then search within the returned results for your server's name. If you were so inclined, you could use the VB6 Winsock control to connect to the host box (assuming the SQL Server is set up to communicate via TCP/IP) on port 1433, IIRC. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingwinsockcontrol.asp for how to use the Winsock control. Doing something like this would allow you to tell if both server and SQL Server services were up, without having to query any databases just to get status.
    695 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following