我正在开发一个成绩管理系统。我只会问如何获取列的所有数据并将其放入选定的标签并将其保存到新数据库
如果有其他方法或建议,我将不胜感激 - 我只是新来的。
这是我的代码
string sql = "select distinct * from tbl_TestGrade where ID = '" + textBox1 .Text+ "' ";
cm = new SqlCommand(sql, cn);
dr = cm.ExecuteReader();
while (dr.Read())
{
// I want to get all the data of the student subjects by id
}
dr.Close();