Hi Thanks for clicking
We are looking to utilise the new BindingSource Data Object supplied in ADO.NET2.
We have BindingSource binding to a table, Tbl_Engineer fine. Our Form has several Textboxes bound to this table by using the BindingSource. The Textboxes take on the data correctly.
We can even Save and write back to the database by clicking a Save button that runs this code
Me.Validate()
Me.bindingSource1.EndEdit(
)
Me.daSQLEngineer.Update(Me
.dsSQLEngi
neer.Tbl_E
ngineer)
However, we would also like to add to the Table, therefore we have added a New Button
In the new button event we do this BindingSource1.AddNew(). It clears all fields ready for entry!!!
Upon clicking the Save button, it runs the same code that code as above, without the EndEdit in place (I removed EndEdit for testing purposes)
It doesn't crash, but it doesn't add a new record into Tbl_Engineer
Anybody offer any help on this BindingSource AddNew method??
Start Free Trial