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

Answers were Sorted based on User's Feedback



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

Answer / srikanth r

The two key events are InfoMessage and StateChange events.

InfoMessage event occurs when informational message is
returned from data source that do not results in throwing
an exception.
StateChange event occurs when there is a change in
Connection to the data source.

Is This Answer Correct ?    23 Yes 1 No

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

Answer / 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

More ADO.NET Interview Questions

What is @@rowcount and with small code snippet explain the usage?

4 Answers   BirlaSoft,


How do you handle data concurrency in .NET ?

9 Answers   Infogain, SunGard,


what is a dataview?why is it used for?

4 Answers   Choice Solutions,


What is the current version of entity framework?

0 Answers  


Define ado.net?

0 Answers  






How do we invoke queries from the application ?

2 Answers   ICICI, Microsoft,


what is typed and untyped dataset

3 Answers  


How can we load multiple tables in a dataset?

0 Answers  


What are the different ado.net namespaces?

0 Answers  


Explain why canot we use multiple inheritance and garbage collector paralelly in .net?

0 Answers  


What is data adapter in ado.net with example?

0 Answers  


How to connect and retrieve data from database using dataset

0 Answers  


Categories