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
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 |
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 |
What are the steps in connecting to database?
Explain advantages of ado.net?
what is a dataset?
Which method is used to sort the data in ADO.Net?
What is the executescalar method?
How can you implement sub data grid in a master datagrid?
What is a serialized object?
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?
In how many ways we can retrieve table records count? How to find the count of records in a dataset?
How to find the given query is optimised one or not?
FetCh Records No 5 to 10 From Dataset
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