|
-
Feb 22nd, 2012, 03:44 AM
#4
Re: TableAdapter.UpdateAll in Master/Detail
I would change the TableAdapter query to include an extra column from the other table, so you have the ID and name. You can then hide the ID column in the grid. When the value changes in the name column, you use your own code to search the parent table for that name and, if it's present, set the ID. If the name is not present then set the ID field to null. When it's time to save, find all the null IDs and insert records for them into the parent table. Once that's done you can get the new IDs and substitute them into the child tabel for the nulls and then save the child table.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|