【发布时间】:2015-06-20 08:15:28
【问题描述】:
con.Open();
string select = "SELECT * FROM WHERE username='" + this.textBox1.Text + "' AND pasword='" + this.textBox2.Text + "'";
SqlCommand cmd = new SqlCommand("SELECT * FROM[Table_2]", con);
SqlDataReader reader = null;
reader = cmd.ExecuteReader();
while (reader.Read())
{
if (textBox1.Text == (reader["username"].ToString()) && textBox2.Text == (reader["pasword"].ToString()))
{
this.Hide();
Form2 frm = new Form2();
frm.Show();
frm.Activate();
}
else
{
MessageBox.Show("gabim");
}
con.Close();
【问题讨论】:
-
你缺少一些右括号..
标签: threadpool