Question - What are the key events of SqlConnection Class?
Answer -
The two key events of SqlConnection are:
- StateChange event: This event occurred when the state of the Connection changes. The event handler receives an argument (Datatype: StateChangeEventArgs) which contains the data related to that particular event.
- InfoMessage event: This event occurred when an info message or Warning is returned from a data source. The event handler receives an argument (Datatype: SqlInfoMessageEventArgs) which contains the data related to that particular event.