Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio 2015 & .NET 4.6
  4. Saving data with data-bound Form Controls

Saving data with data-bound Form Controls

Scheduled Pinned Locked Moved Visual Studio 2015 & .NET 4.6
helpdatabasetutorialcareer
2 Posts 2 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raabi Anony
    wrote on last edited by
    #1

    Hello again! For the past two days and nights, I am struggling with my data-bound form to save the changes, I make. I have completely exhausted the Web for finding a clue. I M doing exactly the same as suggested everywhere, but in vain. As one example, I M using the NorhtwindDataSet and has dropped only 3 Fields - ProductID, ProductName, and the UnitPrice from the Products table (in detail view) on to the form. The Navigator displays all the records without any problem. When I modify any value from any of the 3 fields, it accepts obediently. But, when I run the form again, No modification is there - showing all the older ones. The auto-generated code behind is as below:

    Private Sub ProductsBindingNavigatorSaveItem_Click_3(sender As Object, e As EventArgs) _
    Handles ProductsBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.ProductsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.NorthwindDataSet)
    End Sub

    I tried my own Save button, and copied the above code in its Procedure, with no luck. I have tried this with plenty of databases, including my own database tables as well, with exactly the same problem. I M so much frustrated that I feel like quitting my job. Please help me, taking me as a novice. Regards

    L 1 Reply Last reply
    0
    • R Raabi Anony

      Hello again! For the past two days and nights, I am struggling with my data-bound form to save the changes, I make. I have completely exhausted the Web for finding a clue. I M doing exactly the same as suggested everywhere, but in vain. As one example, I M using the NorhtwindDataSet and has dropped only 3 Fields - ProductID, ProductName, and the UnitPrice from the Products table (in detail view) on to the form. The Navigator displays all the records without any problem. When I modify any value from any of the 3 fields, it accepts obediently. But, when I run the form again, No modification is there - showing all the older ones. The auto-generated code behind is as below:

      Private Sub ProductsBindingNavigatorSaveItem_Click_3(sender As Object, e As EventArgs) _
      Handles ProductsBindingNavigatorSaveItem.Click
      Me.Validate()
      Me.ProductsBindingSource.EndEdit()
      Me.TableAdapterManager.UpdateAll(Me.NorthwindDataSet)
      End Sub

      I tried my own Save button, and copied the above code in its Procedure, with no luck. I have tried this with plenty of databases, including my own database tables as well, with exactly the same problem. I M so much frustrated that I feel like quitting my job. Please help me, taking me as a novice. Regards

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This is not a Visual Studio issue; please use the Visual Basic or Database forum.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups