Check whether connection to the database is possible or not?
<p>I need to connect to the sql server database from my c# code.
sometimes because of some error( i dont know what it is) i cannot open connection
that is
conn.open() throws exception
so i need to check whether i can connect to the database before i am opening connection.</p>

<p>Thanks for helping me.</p>
