how to update the datas present in textbox to gridview control (gui) ,SQL2005
-
Hi in my windows application i have two forms one contains gridview, dataset and binding source. the other form has textbox,combobox and a button. if i click the button present in second form the datas present in textbox shld be update with the combobox...the update result shld be present in grid view... i have written the code but its not working here is the code private void botton_click() { SqlConnection con=new SqlConection)("severname=dot ;database=data;uid=123;pass=sdf;") SqlCommand cmd=new SqlCommand("update tablename set Textbox='"+textBox1.Text+"' where Combo='"+ComboBox1.SelectedItem+"',con") cmd.ExecuteNonQurey(); con.Close } the above code is running but its not updating the gridview Please give me some ideas thanking you
-
Hi in my windows application i have two forms one contains gridview, dataset and binding source. the other form has textbox,combobox and a button. if i click the button present in second form the datas present in textbox shld be update with the combobox...the update result shld be present in grid view... i have written the code but its not working here is the code private void botton_click() { SqlConnection con=new SqlConection)("severname=dot ;database=data;uid=123;pass=sdf;") SqlCommand cmd=new SqlCommand("update tablename set Textbox='"+textBox1.Text+"' where Combo='"+ComboBox1.SelectedItem+"',con") cmd.ExecuteNonQurey(); con.Close } the above code is running but its not updating the gridview Please give me some ideas thanking you