Joe Wilson

Joe Wilson

  • NA
  • 7.8k
  • 432.3k

What is the problem of using id confirmation in PROGRAM?

Jun 17 2014 9:53 AM
 I want to use this code in order to confirm my access data base information to enter to the form1 of my program but i couldn't use confirmation and compiler directly activate the form 1.
What is the problem?
 
 
 
private void Acceptbtn_Click(object sender, EventArgs e)
{
Connection.connectionString = @"provider = microsoft.Ace.oledb.12.0; Data source = D:\\Database 10.accdb";
Connection d1 = new Connection();
bool b = d1.IsExist("select * from Administration where Student_Number = '" + textBox3.Text + "' and Student_ID = '" + textBox2.Text + "'");
if (b)
{
this.Hide();
Form1 m1 = new Form1();
m1.ShowDialog();
}
else
lblInfo.Text = "Not Exist !";
}