Saving data with data-bound Form Controls
-
Hello everybody! I M facing a brain busting issue for the last 3 days and desperately seeking help. As a most trivial example, I M using the NorhtwindDataSet and has dropped only 3 Fields - ProductID, ProductName, and the UnitPrice from the Products table (in details 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 - the same old values are making faces at me. 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 SubI 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. Please help me, taking me as a novice. Regards
-
Hello everybody! I M facing a brain busting issue for the last 3 days and desperately seeking help. As a most trivial example, I M using the NorhtwindDataSet and has dropped only 3 Fields - ProductID, ProductName, and the UnitPrice from the Products table (in details 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 - the same old values are making faces at me. 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 SubI 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. Please help me, taking me as a novice. Regards
Are you using the Access database version of Northwind, and all your other databases for that matter?
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Are you using the Access database version of Northwind, and all your other databases for that matter?
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakThanks for a response, at least. I am using MS SQL Server 2015 Express edition and working in VisualBasic.NET. Not a single project is functioning to Insert or Update any record, whether in DataGridView or in detailed format. I M suffering and seek help desperately. Regards