none
Binding navigator save button RRS feed

  • Question

  • Hello, I am using VS 2008, VB, and an Access db.  I cannot get the save button on the binding navigator to work.  I dragged the table from the datasource onto the Windows form creating all of the controls, including the binding navigator.  I can add records but I cannot update.  The code below is what I have (the commented code is what I have already tried):

    Private Sub EquipmentBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EquipmentBindingNavigatorSaveItem.Click
            Me.Validate()
            Me.EquipmentBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.Medical_Equipment_Inventory2DataSet)


            'Me.EquipmentTableAdapter.Update(Medical_Equipment_Inventory2DataSet.Tables("Equipment"))
            'daTableAdapter.Update (dsDataset.Table("TableName"))

    End Sub


    Tuesday, May 10, 2011 6:00 PM

Answers

  • It turned out to be a glitch in the datasource. I am not sure how it happened but when I rebuilt the datasource it worked perfectly. Thanks for your time and assistance.
    • Marked as answer by SoonerPGH Friday, May 13, 2011 8:17 PM
    Friday, May 13, 2011 8:17 PM

All replies

  • Hello SoonerPGH,

    Welcome to the MSDN Forum.

    There is a FAQ article talked about this issue, I qouted some words of it:

    There are two common reasons why this happens:

     (1) You are calling AcceptChanges on your DataRow/DataTable/DataSet before you call Update on your DataAdapter or TableAdapter.

    (2) The other common problem is that in Visual Studio, there is an option to copy your database file to the output folder of your project. Usually this is done with an Access MDB file, or a SQL Server MDF file, when you add the database file to your project.

    You can refer to this FAQ here.

    I hope this can help you. Please feel free to tell me if I misunderstood you.

     

    have a nice weekend,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 13, 2011 10:13 AM
    Moderator
  • It turned out to be a glitch in the datasource. I am not sure how it happened but when I rebuilt the datasource it worked perfectly. Thanks for your time and assistance.
    • Marked as answer by SoonerPGH Friday, May 13, 2011 8:17 PM
    Friday, May 13, 2011 8:17 PM