string strcom = "select Student.StudentID, Name, CourseName,Mark " +
" from Result ,Elective ,CourseInfo,Student" +
"where Elective.ElectiveID= Result.ElectiveID" +
"and Elective.CourseID=CourseInfo.CourseID" +
"and Student.StudentID = Elective.StudentID" +
"and Student.StudentID="+textID;
DataSet ds = new DataSet();
// ds.Tables.Add("Result");
SqlDataAdapter da = new SqlDataAdapter(strcom, conn);
da.Fill(ds);
dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = ds;
dataGridView1.DataMember = ds.Tables[0].DefaultView;
" from Result ,Elective ,CourseInfo,Student" +
"where Elective.ElectiveID= Result.ElectiveID" +
"and Elective.CourseID=CourseInfo.CourseID" +
"and Student.StudentID = Elective.StudentID" +
"and Student.StudentID="+textID;
DataSet ds = new DataSet();
// ds.Tables.Add("Result");
SqlDataAdapter da = new SqlDataAdapter(strcom, conn);
da.Fill(ds);
dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = ds;
dataGridView1.DataMember = ds.Tables[0].DefaultView;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货