Adding records... Strange problem

  • Thread starter Thread starter utmusic
  • Start date Start date
U

utmusic

Guest
I have a dataset filled with my data, the problem comes when I try to add a record to that dataset. Here is my code....

Code:
       Dim reallychange
        
            Try
                Clear out the current edits
                Me.BindingContext(DSReferences, "References").EndCurrentEdit()
                Me.BindingContext(DSReferences, "References").AddNew()
            Catch eEndEdit As System.Exception
                System.Windows.Forms.MessageBox.Show(eEndEdit.Message)
            End Try
            Me.objVectorRef_PositionChanged()

The code does indeed add a record to the end of the dataset, the problem is that I cant navigate to it.

example. I have 302 records... I click the add button, I now have 303 records, but I can only navigate to the first 302. Thanks for your prompt response.
 
Hi,

have not worked with VB.NET yet, but still.
Dont know how you display your data (DatGrid+ado?)...
Sounds like the data is just not getting refreshed on the screen....


Shurik12.
 
Refresh data

Im using seperate controls to display my data. How to I refresh the data in the dataset so that I can navigate to the new record.
 
Hi,

Im not familiar with the .NETs syntaxis but the general idea here that you probaly have to use sometihng like "Resync" or "Requery".

Regards,
Shurik12.
 
Back
Top