How do you check if it is open or closed I was using
if (SQLOperator.SQLCONNECTION.State.Equals("Open"))
however, even the State is 'Open' it fails on this check.
You should be using SqlConnection.State
e.g,
using System.Data; if (myConnection != null && myConnection.State == ConnectionState.Closed) { // do something // ... }
1.4m articles
1.4m replys
5 comments
57.0k users