Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

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();