I found this:
and similar examples. But is there a better way?
I am thinking along the lines of the Automatic Failover Client in the MS SQL Native Client.
It's traditional to handle failover strategies at the system level; that way all applications can enjoy a robust environment.
Not the answer to the question, but it is the more common solution to handle failover.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki