troubleshooting Question

Attempting sense and/or to re-establish database connectivity

Avatar of jkanisut
jkanisut asked on
Visual Basic Classic
11 Comments1 Solution246 ViewsLast Modified:
I have written an NT service using VB 6.0.  Occasionally the service will crash because of the database being shut down for whatever reason.  I need to somehow check to see if the db server is operational again or not.

I'm able to detect the lost connection and have redirected the program to a loop that closes the current connection attempts to reconnect.

Problem is that during this loop, if the DB server is still down, there is an MSSQL error message dialog that appears along with a login dialog box, both of which cannot be answered because this app is an NT service!

Using:  VB6 SP5, DAO 3.6, MSSQL 7 and 2000  (And Oracle and Sybase Anywhere)
Disconnected recordsets will not be acceptable.

Any innovative ideas along the lines of:
   Reestablishign a connection in a "quiet" way (so there are no dialogs).
   Other ways of detecting the lost db server before the db sections in the code

Any other ideas?


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros