I'm writing an application that will grab data from a database stored on the internet. I need to check if the computer has an active internet connection when the application launches and if not prompt the user to connect.

How do I check if an internet connection is open ?