Morning guyz,I need to create a conditional state ment using(if) to ask a statement to execute if content equals a string value and its not working.
This is what I mean
if(cboemployee=="All fieds")
{
mysqlconnection sql = new mysqlconnection();
sql.createconn();
sql.command = sql.connection.CreateCommand();
sql.createconn();
sql.command = sql.connection.CreateCommand();
sql.command.CommandText =" INSERT INTO Result(Name,Address,phn,Sex,Position) SELECT Name,Address,phn,Sex,position FROM Employee_data ";
MessageBox.Show("done");
sql.command.ExecuteNonQuery();
sql.connection.Close();
sql.connection.Dispose();
}
its working without if but when I but if it becomes static plz help now.