creating login , using mysql server 5.7.14 and workbench 6.3 and c# window form application : i am trying to make a check (login) on the user which is entering into my application. i have made a database and table named 'mydb', 'employee' respectively. i have entered username and password into uname and pasword columns of table employee. what i want to do is that whether the username and password entered by user is valid or not? it means is it exists in table employee or not? if yes allow access and if not access denied.
for this purpose  i have written following code in my c# window form application using visual studio 2013 ultimate.
 

    try
    {
    string myconnection = "datasource=localhost; port=3306; username=root; password=shaban;  ";
    
     MySqlCommand selectcommand = new MySqlCommand(" slect * from mydb.employee where uname= "+this.username_txt.Text+" and pasword = "+this.pasword_txt.Text+"", myconn);
    
     MySqlDataReader myreader;
     myconn.Open();
     myreader = selectcommand.ExecuteReader();
                    int count = 0;
                    while (myreader.Read())
                    { count = count + 1; }
    
                    if (count == 1)
                    { MessageBox.Show("username and pasword is correct"); }
                    
                   else if (count > 1)
         { MessageBox.Show("Duplicate username and password...! Access Denied "); }
                    else 
       { MessageBox.Show(" username and pasword not existing.. Try again" ); }
    
                    myconn.Close();
    }
     catch (Exception ex)
               
     {    MessageBox.Show(ex.Message);    }
        