1
我想将标记作为projPoints1设置为epual SQL查询返回的内容。基于SQL查询结果更改标签文本
这是我目前拥有的代码:
using (QC.SqlCommand cmd = new QC.SqlCommand("SELECT *,[proj] FROM[dbo].[WeeklyStats] WHERE[playerID] = @player1 AND [weeks] = @week1 "))
{
string week1 = Weeks.SelectedValue.ToString();
cmd.Parameters.AddWithValue("@player1", playerArr[0].ToString());
cmd.Parameters.AddWithValue("@week1", week1);
//runs the sql statement and adds them all to the dropdown list
cmd.Connection = connection;
cmd.CommandType = DT.CommandType.Text;
QC.SqlDataReader reader = cmd.ExecuteReader();
projPoints1.Text = ;
connection.Close();
}