string sql = "select CourseName,TeacherName,StudentName,Credit,Grade,CourseType from CourseTable,Gradetable,StudentTable,TeacherTable where GradeTable.CourseID=CourseTable.CourseID and GradeTable.StudentID=StudentTable.StudentID and CourseTable.TeacherID=TeacherTable.TeacherID and Grade.StudentID like'"
+ txtsearchstudent.Text.ToString() + "%' and Course.TeacherID like'" + txtsearchteacher.Text.ToString() +"%' and Grade.CourseID like'" +txtsearchcourse.Text.ToString() + "%'";
DataSet ds = DBHelper.GetDS(sql);
dataGridView1.DataSource = ds.Tables[0];
无法绑定由多个部分组成的标识符 "Grade.StudentID"。
无法绑定由多个部分组成的标识符 "Course.TeacherID"。
无法绑定由多个部分组成的标识符 "Grade.CourseID"。
------解决方案--------------------
Grade.StudentID 就没有Grade这个表啊