SqlRowUpdatingEventHandler 委托

定义

表示将用来处理 RowUpdatingSqlDataAdapter 事件的方法。Represents the method that will handle the RowUpdating event of a SqlDataAdapter.

public delegate void SqlRowUpdatingEventHandler(System::Object ^ sender, SqlRowUpdatingEventArgs ^ e);
public delegate void SqlRowUpdatingEventHandler(object sender, SqlRowUpdatingEventArgs e);
type SqlRowUpdatingEventHandler = delegate of obj * SqlRowUpdatingEventArgs -> unit
Public Delegate Sub SqlRowUpdatingEventHandler(sender As Object, e As SqlRowUpdatingEventArgs)

参数

sender
Object

事件源。The source of the event.

e
SqlRowUpdatingEventArgs

包含事件数据的 SqlRowUpdatingEventArgsThe SqlRowUpdatingEventArgs that contains the event data.

继承
SqlRowUpdatingEventHandler

注解

处理程序不需要执行任何操作, 你的代码应避免生成异常或允许异常传播到调用方法。The handler is not required to perform any action, and your code should avoid generating exceptions or allowing exceptions to propagate to the calling method. 任何访问调用方的异常都将被忽略。Any exceptions that do reach the caller are ignored.

处理程序可能使用SqlRowUpdatingEventArgs来影响更新的处理。The handler may use the SqlRowUpdatingEventArgs to influence the processing of the updates. 例如, 处理程序可以选择跳过对当前行的更新, 或跳过所有剩余行的更新。For example, the handler may opt to skip the update of the current row or skip the update of all remaining rows. 请注意, 行将按从数据源接收行的顺序进行更新。Note that the rows are updated in the order that they were received from the data source.

创建 SqlRowUpdatingEventArgs 委托时,需要标识将处理该事件的方法。When you create a SqlRowUpdatingEventArgs delegate, you identify the method that will handle the event. 若要将事件与事件处理程序关联,请将该委托的一个实例添加到事件中。To associate the event with your event handler, add an instance of the delegate to the event. 除非移除了该委托,否则每当发生该事件时就会调用事件处理程序。The event handler is called whenever the event occurs, unless you remove the delegate. 有关事件处理程序委托的详细信息, 请参阅处理和引发事件For more information about event handler delegates, see Handling and Raising Events.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅