How to Updating Data when using SqlCommand Object in ADO.Net?

How to Updating Data when using SqlCommand Object in ADO.Net?

The ExecuteNonQuery method is also used for updating data.
  The following code shows how to update data: 
1.Prepare command string
2.Instantiate a new command with command text only
SqlCommand cmd = new SqlCommand(updateString)
3.Set the Connection property
cmd.Connection = conn;
4.Call ExecuteNonQuery to send command
cmd.ExecuteNonQuery(); 

By:Aditya
Date:2028-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related ADO.NET Subjective Links

ADO.NET Subjective interview questions and answers for experienced and fresher