SQLConnection cs = new SQLConnection("YOUR CONNECTION STRING");
if(cs!= null && cs.State == ConnectionState.Open) { // your connection is working, means it will connected // do what you need your code goes here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)