danijel.drmic
Member
- Joined
- Jul 2, 2009
- Messages
- 10
- Programming Experience
- 5-10
when I am writing something in a textbox called SIF and click button6 in datagridview1 get a letter by letter. each letter in the new row. then change text in the SIF and again click on button6. old base deleting and review the new (as I conceived). However, when I click on query2 that I made in the datagridview task -> add query. I get the old and new data. I want only new data. please help
VB.NET:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Frek1DataSet.Clear()
Me.SlovoBindingSource.AddNew()
For i = 0 To SIF.TextLength - 1
TextBox1.Text = SIF.Text.Chars(i)
Me.SlovoBindingSource.AddNew()
Next
SlovoTableAdapter.Update(Frek1DataSet)
End Sub
Private Sub Query2ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Query2ToolStripButton.Click
Try
Me.SlovoTableAdapter.query2(Me.Frek1DataSet.slovo)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub