How do you check if it is open or closed I was using
if (SQLOperator.SQLCONNECTION.State.Equals(\"Open\"))
however, even the State is \'Op
The .NET documentation says: State Property: A bitwise combination of the ConnectionState values
So I think you should check
!myConnection.State.HasFlag(ConnectionState.Open)
instead of
myConnection.State != ConnectionState.Open
because State can have multiple flags.