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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check to see if Database is online

Access Version or Conversion

Check to see if Database is online

by  dglienna  Posted    (Edited  )
Ever want to check to see if a DB is online, similar to pinging an IP address?

This query returns no records, but you can trap the error to see if it's not online.

Pick a field that is in your DB, and set up the connection. Then execute this query, substituting the name of the db.

Code:
SQLstr = "Select * from myTable Where 1 = 2"
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top