I am trying to have one button run many different update commands on different tables to update the same info. I've found many sites talking about how to do similar things, but nothing close enough that I could get it working for my purposes. Right now I have

but this will ignore the first two sets and just update [PPC] or whatever the last set in the group is. I've tried putting Thread.Sleep(1000); in between the sets in case each operation just needed more time to finish or something, but as I had assumed it did nothing. I have also tried using UNION or ; to string multiple commands together, but still got nowhere.

Any suggestions on how to get this to work? or possibly even on a better way to achieve this same result?

What does the ASP.Net markup look like for the control that is firing off the update_click event? Is the last UPDATE statement the one that is hard-coded into the AccessDataSource1.UpdateCommand by default in the markup page source? It's possible your update_click method is not actually ever running, as the code looks fine as far as I can tell.
–
mellamokbAug 27 '12 at 18:59

The button itself is just <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" OnClick="update_click" Text="Confirm Update" CommandName="Update" /> and there is no hard coded update command right now. I was afraid that might mess with the updates from the code behind.
–
user1579694Aug 27 '12 at 19:05

Well since you said CommandName="Update", your button is functioning as firing update command, if it is embedded inside of the data control (i.e., GridView or DetailsView). But I thought .Update() would override the behavior. Checking the docs...
–
mellamokbAug 27 '12 at 19:08

yeah, I think you're right that the button is the update command. I just tried removing it from the button and now nothing updates, so the codebehind AccessDataSource.Update() lines are not doing anything. and its actually a formview (I assume that doesn't matter, but just in case...)
–
user1579694Aug 27 '12 at 19:12

Hmm, that is very strange. Can you try debugging and stepping through the code, and see if the lines of code in update_click even fire at all? Or for instance, drop a Response.Write("HERE"); to see if it is hit. Meanwhile I'll try a test here... Edit: I just tried a test where I used MyDataSource.Update and it worked just fine. Can you provide more code related to the update from the beginning of the Page_Load, in case something else is stopping that event from properly running?
–
mellamokbAug 27 '12 at 19:13

What's wrong with setting the UpdateCommand? Shouldn't that work just as well?
–
mellamokbAug 27 '12 at 19:01

hmm, I thought the AccessDataSource1.Update(); line was executing the SQL, that would explain its behavior. What is the actual command to execute this between each update?
–
user1579694Aug 27 '12 at 19:04