我试图根据cookie中的值将详细信息插入表中。这里是代码插入带有where子句的语句c#
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["RegistrationConnectionString"].ConnectionString);
conn.Open();
string insertQuery = "insert into Details (Employees, Performance, TotalPerformance, Attitude, TotalAttitude) values(@employees, @performance ,@totalPerformance, attitude, totalAttitude)";
SqlCommand com = new SqlCommand(insertQuery, conn);
com.Parameters.AddWithValue("@employees", Request.QueryString["employees"]);
com.Parameters.AddWithValue("@performance", totalPer.ToString());
com.Parameters.AddWithValue("@totalPerformance", totalPercent.ToString());
com.Parameters.AddWithValue("@attitude", totalAtt.ToString());
com.Parameters.AddWithValue("@totalattitude", totalPercent.ToString());
com.ExecuteNonQuery();
这工作正常,但在管柱嵌查询行我想,如果说对列“名称”中的值where子句,在那里将值插入到某个行中添加行匹配一个cookie。我不知道正确的语法 感谢您的帮助
感谢您的帮助伙伴 – user3542214 2014-09-04 13:40:09