I can't to insert new record in database , ( I mean I made grid view and connect him with a access database and made all things to insert data in column in datagridview and it showing that row is filed with new data but when I restart form in database there is no new record)..
I use for exmpl: same code but with OLEDB;
Expand|Select|Wrap|Line Numbers
- string connectionString = "Data Source=SERV\\SQLEXP;Initial Catalog=tempdb;Integrated Security=True";
- string command = "UPDATE telefon
- SET prezime="+textBox2.Text+",telefon="+textBox3.Text+"
- WHERE ime ="+textBox1.Text+"";
- SqlConnection con = new SqlConnection(connectionString);
- SqlCommand cmd = new SqlCommand(command, con);
- con.Open();
- cmd.ExecuteNonQuery();
- con.Close();
- this.telefonTableAdapter.Fill(this.tempdbDataSet.telefon);
it all works well on form it show adding a data to gridview but it not store in database, I was use :
Expand|Select|Wrap|Line Numbers
- this.telefonTableAdapter.Update();
Expand|Select|Wrap|Line Numbers
- this.telefonTableAdapter.Insert();
- AcceptChanges();
PLEASE HELP!!!