views:

315

answers:

3

How do you run an update query in a data source control from a button? I have the data source control with the update query configured in it. I just don't know what to put in the button_click event to make it run.

+1  A: 

In the event handler just call the Update method for your Datasource control.

Ken Pespisa
A: 

I get an error when I call the Update method of the Datasource

sdsUpdateName.Update;

Only assignment, call, increment, decrement, and new object expressions can be used as a statement

+1  A: 

aha I needed parenthesis after the update command

sdsUpdateName.Update();