这是选择用户密码的代码,其中 id = 1 ;我想将此值与文本框匹配。如果该值匹配,则将打开第二个窗口窗体。但它不工作......
OleDbConnection con = new OleDbConnection(database2.conn);
con.Open();
OleDbCommand OCom = new OleDbCommand("select user_pasword from tblpasword where id = 1", con);
OleDbDataReader Dreader = OCom.ExecuteReader();
while (Dreader.Read())
{
MessageBox.Show(Dreader + "");
}