Is it a problem if while ConnectionState is doing opening , we Open the connection again?
Yes, it can throw an exception.
Straight from MSDN: SqlConnection.Open method
InvalidOperationException
:
Cannot open a connection without specifying a data source or server.
or
The connection is already open
(are you executing the method on different threads with a single shared connection?)
Mehrdad Afshari
2010-05-02 07:31:06