|
-
Aug 30th, 2008, 08:51 AM
#2
Re: How to combine Insert and Updates?
First up, don't ask the same question in multiple threads. If you wanted to shift the discussion from the Database Development forum to the VB.NET forum then you should have asked a moderator to move the thread.
As to the question, why would you need two Buttons anyway? You just put all your data into a DataTable and call Update on the DataAdapter. That will execute the adapter's InsertCommand on all the DataRows with a RowState of Added and the UpdateCommand on all the DataRpws with a RowState of Modified. One method call, ergo one Button, to save all the data.
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
|