Timeline for SqlConnection.Open vs SqlConnection.OpenAsync - what's different between the two beyond the obvious?
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 30, 2022 at 22:40 | comment | added | Dawid Wekwejt |
The condition if (con.State != ConnectionState.Open) should be if (con.State == ConnectionState.Closed) because it is not a good idea to try open next connection when current one is for example in state Connecting. Source: ConnectionState Enum
|
|
Dec 23, 2021 at 11:51 | review | Late answers | |||
Dec 26, 2021 at 13:45 | |||||
Dec 23, 2021 at 11:33 | history | answered | developer65 | CC BY-SA 4.0 |