System.Web 2.0.0.0 System.EventArgs

The class is used in the , , , and events to pass information about a database operation after it is performed by the data source control. This information includes the number of rows affected by the operation, the object that the data source used to perform the operation, and any exception information that resulted. By adding an event handler delegate to handle the , , or events, you can examine this data and perform any additional post processing required.

The control exposes many events that you can handle to work with the underlying data objects during the course of a data operation. The following table lists the events and associated and event handler classes, to better guide you to the various events that correspond to the life cycle of a data operation using the control.

Event

EventArgs

EventHandler

occurs before the data is retrieved.

, , occur before an insert, update, or delete operation is performed.

, , , occur after the data retrieval, insert, update, or delete operations completes.

Provides data for an event that is raised by the control after a data operation has completed.

- Constructor
  To be added.
  To be added.

  Initializes a new instance of the class, using the specified output parameters, return value, and number of rows affected by the database operation.

  The that represents the database query, command, or stored procedure that is submitted to the database by the control.
  An thrown by the database operation, if applicable.
  2.0.0.0
- Property
  System.Int32 To be added.

  All operations return the number of rows affected by the operation. The property has the same value as the return value of the , , and methods.

  When the method is called and the data source is set to mode, the return value is 0 in all cases.

  Gets the number of rows affected by a database operation.

  2.0.0.0
- Property
  System.Data.Common.DbCommand To be added.

  You can handle the , , , or event to examine and manipulate the properties of the after it is submitted by the control to the database. The property enables you to access return values and values in any output parameters after the database operation is performed through its property, as well as the property, which represents the SQL query, command, or stored procedure name that was submitted to the database.

  Any output parameters are specifically from parameters that have an or value for the property of the object. A return value is from a parameter that has a value.

  Gets the database command submitted to the database.

  2.0.0.0
- Property
  System.Exception To be added.

  The property does not represent the actual exception thrown by the database operation. You can access the thrown exception using the property.

  Gets a wrapper for any exceptions thrown by the database during a data operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  If the database throws an exception, the property is set to false and the exception is wrapped by the property. If you use an , you can check the property and handle the exception. If you handle the exception, set the property to true or the control will throw an exception.

  Gets or sets a value indicating whether an exception thrown by the database has been handled.

  2.0.0.0