string ID = "";
if (Session["sID"] != null)
{
ID = Session["sID"].ToString();
con.Open();
string surveysr = "Select ShowResult from Survey where SurveyID=" + ID ;
SqlCommand cmd2 = new SqlCommand(surveysr, con);
SqlDataReader dr = cmd2.ExecuteReader();
.............
与えられたエラーは「無効な列名'S29'」でした。問題は、IDが一重引用符なしのS29だけであるということでした。ただし、SQLキャッチが''である場合。何か案が??