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 are the steps in connecting to database?

3 Answers   IBM, Microsoft,


Explain advantages of ado.net?

0 Answers  


what is a dataset?

9 Answers   Choice Solutions,


Which method is used to sort the data in ADO.Net?

0 Answers  


What is the executescalar method?

0 Answers  






How can you implement sub data grid in a master datagrid?

1 Answers  


What is a serialized object?

0 Answers  


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

0 Answers  


In how many ways we can retrieve table records count? How to find the count of records in a dataset?

0 Answers  


How to find the given query is optimised one or not?

0 Answers  


FetCh Records No 5 to 10 From Dataset

4 Answers  


OleDbDataAdapter ole=new OleDbDataAdapter(new OleDbCommand ("select * from login",oleDbConnection1)); OleDbCommandBuilder cmd=new OleDbCommandBuilder(ole); ole.Fill(dataSet11,"login"); DataRow drow=dataSet11.Tables ["login"].NewRow(); drow[0]=textBox1.Text; drow[1]=textBox2.Text; drow[2]=textBox3.Text; dataSet11.Tables["login"].Rows.Add (drow); ole.UpdateCommand=cmd.GetUpdateCommand(); ole.Update(dataSet11,"login"); MessageBox.Show("one row added"); this gives exception.how to solve it

1 Answers   Nimaya,


Categories