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 |
Which type of database is used while processing dynamic database?
what is the syntax code to oledb to connect oracle
Explain what are acid properties?
If we are not returning any records from the database, which method is to be used?
What are the rules to implement connection pooling?
Explain how to pass multiple tables in datasets simultaneously?
What is the difference between the clone() and copy() methods of the dataset class?
Difference between function and trigger?
Difference between DataReader and DataAdapter / DataSet and DataAdapter?
How To Update A Column In A DataGrid Using C#.NET? I am getting InvalidCastException as (Specified cast is not valid) while updating 2nd column in a datagrid? Id,firstname,lastname are the three columns of my datagrid respectively. I wanted to edit the second column(lastname) and update it. I did the following code in DataGrid's updatecommand(),but failed to update ! Int varid=(int)DataGrid1.DataKeys[e.Item.ItemIndex]; TextBox lnm=(TextBox)e.Item.Cells[2].Controls[0]; string str=lnm.Text ; SqlCommand cmd=new SqlCommand("update customer set lastname='" + str + "' where id=" + varid + "",con); cmd.ExecuteNonQuery(); DataGrid1.EditItemIndex=- 1; DataGrid1.DataBind();
What are the different methods by which we can populate a dataset?
Can we do database operations without using any of the ado.net objects?