locked
Problems with updating modified data RRS feed

  • Question

  • Hi,

    I'm using VS.NET 2003 and a MS Access Database with Windows froms (not web based)

    the Scenario:
    When trying to update edited records it does not update correctly - (adding and deleting records are working fine)
    E.g. when editing one record and exit to update it does not update anything.
    With troubleshooting one can see the the datarowVersion.proposed and .original values are different but the datarow state does not changed.

    When editing e.g. four records and exit to update it only updates the first three records

    Only populate the database adapter when loading the form and updating when closing.

    Any suggestions?
    Thank you in advance.
    Kind regards





    Monday, September 10, 2007 10:20 PM

Answers

  • Hi,

    after a lot of troubleshooting I've added the code in blue and it is working now.

    Code Snippet

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
            mblnChanged = True
            Me.BindingContext(ds, "STUDENT").Position = Me.BindingContext(ds, "STUDENT").Position
            'testSave1() 'for troubleshooting only
        End Sub


    My final question WHY???? I really want to understand why I had to add in this specific line so that the records can save.
    Will you please explain that to me.

    Thanks in advance
    Zel

    • Marked as answer by zellis Thursday, July 17, 2008 3:51 PM
    Tuesday, September 11, 2007 3:38 PM

All replies

  • This is a difficult question to answer without source code!

     

    could be concurrency checking, maybe, or transaction related, or somesuch.

     

    Could you please be more specific with example code, then I will try to help?

     

    Thanks,

     

    Martin Platt.

     

    Tuesday, September 11, 2007 12:03 AM
  • Hi,

    after a lot of troubleshooting I've added the code in blue and it is working now.

    Code Snippet

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
            mblnChanged = True
            Me.BindingContext(ds, "STUDENT").Position = Me.BindingContext(ds, "STUDENT").Position
            'testSave1() 'for troubleshooting only
        End Sub


    My final question WHY???? I really want to understand why I had to add in this specific line so that the records can save.
    Will you please explain that to me.

    Thanks in advance
    Zel

    • Marked as answer by zellis Thursday, July 17, 2008 3:51 PM
    Tuesday, September 11, 2007 3:38 PM