What are different layers of ADO.Net?
No Answer is Posted For this Question
Be the First to Post Answer
What are the namespaces used in ADO.Net to connect to a database?
How to generate a single aggregate?
How can we load multiple tables in to dataset?
What is ado.net objects?
What is sql connection in ado.net?
What is ado in agriculture?
What is the role of the dataset object in ado.net?
What are the key events of sqlconnection class?
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 dao and ado?
How to bind the controls(best practice) comboboxes to the data in the dataset?
How to identify the updated rows in a dataset?