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

What is ado object model?

519


How to pass values into a datatable?

599


Which property is used to check whether a DataReader is closed or opened?

570


What is a string variable?

489


Define isolation?

537






What is dao and ado?

482


What does executenonquery () method return?

502


Explain all the classes those are used for database connections between sql server and asp.net?

507


What is the provider being used to access oracle database?

503


What is execute reader in ado.net?

495


What provider ado.net use by default? Explain the role of data provider in ado.net?

528


Can you explain how to enable and disable connection pooling?

506


What is the difference between a datareader and a dataset?

518


Difference between sqlcommand and sqlcommandbuilder?

585


What is openrowset?

497