Jan 24, 2012 02:38 AM|pure_m23|LINK
I am using enterpriseLib 3.1. Below is a code snippet, which I am using to check whether conneciton is up or not.
But the code at times does not throw error even when I have disconnected the cable.
My app is database agnostic, so the code should work with any DB type.
Database _db = DatabaseFactory.CreateDatabase("Connection Config Key");
_conn = _db.CreateConnection();
break;//Connection is established
//No Connection... retry