Asp sqldatasource onupdating

Rated 3.89/5 based on 786 customer reviews

Sql Data Source allows you to Select/Insert/Update/Delete the data from the database without even writing a single line of code.But sometimes you need to dynamically assign a parameter. Update(); ...doesn't update the value :(I still haven't figured this out. Can this article help me with this issue: I have a procedure in Oracle, that create a temporary table with output data.The connection to the underlying data source is not yet open when the event handler delegate is called.Therefore, you cannot directly cancel the Update database operation by calling the Cancel method on the Db Command object that is exposed by the Sql Data Source Command Event Args object.

The following code example demonstrates how to display and update data retrieved from an ODBC database in a Grid View control.

After a record is successfully updated, the Updated event is handled by an event handler to perform a post-processing step where an e-mail message notification is sent.

event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the Sql Data Source control performs the update operation.

First let's take a look at the simple update which does not dynamically assign the parameters.

In the example below I am using a simple Grid View control and updating the User Name, First Name and Last Name.

Leave a Reply