SqlDataSourceStatusEventArgs.Command Property

Gets the database command submitted to the database.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
property DbCommand^ Command {
	DbCommand^ get ();
}
/** @property */
public DbCommand get_Command ()

public function get Command () : DbCommand

Not applicable.

Property Value

The DbCommand object that represents the database command submitted to the database.

You can handle the Selected, Updated, Inserted, or Deleted event to examine and manipulate the properties of the DbCommand after it is submitted by the SqlDataSource control to the database. The Command property enables you to access return values and values in any output parameters after the database operation is performed through its Parameters property, as well as the CommandText 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 InputOutput or Output value for the Direction property of the Parameter object. A return value is from a parameter that has a ReturnValue value.

The following code example demonstrates how to examine the values of output parameters when using a SqlDataSource control with a stored procedure. The SelectParameters collection contains the parameters that the SqlDataSource uses for the stored procedure, and consists of parameters that pass information from the Web form to the stored procedure as well as parameters that pass information back to the form. This code example is part of a larger example provided for the SqlDataSourceStatusEventArgs class.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: