what are the two key events for the sql connection class?
explain the differnce between the two.

Answer Posted / annie

The two key event of sqlConnection class are:
StateChange event:Occurs only when the state of the connection with the database changes. The evnthandler receives an argument of type StateChangeEventArgs. This argument contains data related to that perticular event.
The properties of this event are: CurrentState and OriginalState.
InfoMessage event: Occurs only when an informational message returned from the database having connection with. The event handler receives an argument of type SqlInfoMessageEventArgs. This argument contains the data related to that particular event.
The properties of this event are: Error,Message and Source.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we serialize data?

497


What is the default provider in ado.net?

514


Which is faster datareader or dataadapter?

529


Is bulk insert faster than insert?

491


What is partial class?

550






How do you merge 2 datasets into the third dataset in a simple manner?

535


What is sqldatareader in ado.net?

501


What is difference between connected and disconnected architecture in ado.net?

585


What is ado.net code?

521


How does ado.net work?

492


What is the difference between Dataset. clone and Dataset.copy?

557


What are the advantages of oledb compared with other classes?

2321


What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?

554


Which method in OLEDBAdapter is used to populate dataset with records?

561


What are good ado.net object to replace to ado recordset object.

568