MSDN Archive Home
Help and FAQs
Visual Basic Forms over Data Video Series Samples
All Resource Updates
Create New Discussion
Trouble with Delete in multi-table form (video 3)
Jun 29 2008 at 10:10 PM
I've been following the videos and in video 3, when there are multiple tables on a single form, the video does not explain how to implement DELETE or INSERT functionality. How does this work?
Jul 16 2008 at 12:26 AM
The video uses the Data Source Wizard to automatically create the update, insert and delete statements. If you use the toolbar (BindingNavigator) you can add and delete the parent rows and if you want to delete the child rows, just select the row header and press the delete key. Under the covers the controls are bound to a BindingSource and you can programatically call AddNew or Delete on the parent or child bindingSource to add or remove rows from the DataSet. When you call Update on the tableAdapters later, the UpdateCommand, InsertCommand and DeleteCommand are executed against the databasse. To look at those commands select the TableAdapter in the Dataset designer and look at the properties.
These videos will help explain these concepts better:
Sign in to post message or set email notifications
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.