在线等啊
private void button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "Data Source=(local);Initial Catalog=team11;Integrated Security=True";
conn.Open();
string sql = "select * from C_Select where order='" + textBox1.Text + "'";
SqlCommand sqlCommand = new SqlCommand(sql, conn);
SqlDataReader reader = sqlCommand.ExecuteReader();这里哪里错了啊
if (reader != null)
{
if (!reader.Read())
{
MessageBox.Show("输入序号错误,请重新输入");
return;
}
}
}