try { con = new MySqlConnection(); con.ConnectionString = ConfigurationSettings.AppSettings["constr"]; con.Open(); string str = "select pfno,name,desig,oldtno,newtno from empreg where name like " + textBox1.Text; da = new MySqlDataAdapter(str, con); ds = new DataSet(); da.Fill(ds, "empreg"); dataGridView1.DataSource = ds.Tables[1]; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)