There are two possibility :-
1. Create a SP for the query you have mentioned and call it in your code.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Databasename"].ConnectionString); {
using (SqlCommand cmd = new SqlCommand("sp_Name;, con)) {
cmd.CommandType = CommandType.StoredProcedure;
con.Open();
cmd.ExecuteNonQuery();
2. Call the query as it is in your code.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Databasename"].ConnectionString);
SqlCommand cmd1 = new SqlCommand("update DTForQueNewEntry SET DTForQueNewEntry.OptionSet = dtFinal.OptionSet
where DTForQueNewEntry.Point_Mapping_Sr= dtFinal.Point_Mapping_Sr AND
DTForQueNewEntry.Question_Name = dtFinal.Question_Name");
con.Open();
cmd1.ExecuteNonQuery();
con.Close();
- NP