What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?
What is difference between datareader and dataadapter?
What is the functionality of data provider in ado.net?
What is ado.net tutorial?
Difference between DataReader and DataAdapter / DataSet and DataAdapter?
Which provider is used to connect ms access, oracle, etc…?
What is shadow copy?
Explain the difference in an abstract class and an interface?
Explain all the classes those are used for database connections between sql server and asp.net?
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 is the difference between Datareader and Dataset?
How to sort the data in Datatable
Which parameter of ConnectionString is used to specify the name of the database?