I am trying to add a row to a table in the database using the table adapter's update method. I am not getting any errors. It looks like it is working fine, but there is no actual insertion into the database. However, if I try to insert the same row again I get a constraint exception saying that I am trying to insert a data that is already in the table. But in the end there is no data physically inserted into the table. I tried to use table adapter's insert method but I got the same error.
Where am I doing wrong?
Here is the code where insertion is made:(database name: pompadatabase, table name: pompa)
pompadatabaseDataSet.pompaRow tmprow;
tmprow = pompadatabaseDataSet.pompa.NewpompaRow();
tmprow.isim = textBox5.Text;
tmprow.info = richTextBox1.Text;
tmprow.resim = bao;
tmprow.seri_id = Convert.ToInt32(sinifBox.SelectedValue.ToString());
this.pompadatabaseDataSet.pompa.Rows.Add(tmprow);
this.pompaTableAdapter.Update(this.pompadatabaseDataSet.pompa);