Database.ExecuteNonQuery Method (String, array<Object[])

Executes the storedProcedureName using the given parameterValues and returns the number of rows affected.

Namespace: Microsoft.Practices.EnterpriseLibrary.Data
Assembly: Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll)

Syntax

'Declaration
Public Overridable Function ExecuteNonQuery ( _
    storedProcedureName As String, _
    ParamArray parameterValues As Object() _
) As Integer
public virtual int ExecuteNonQuery(
    string storedProcedureName,
    params Object[] parameterValues
)
public:
virtual int ExecuteNonQuery(
    String^ storedProcedureName, 
    ... array<Object^>^ parameterValues
)
public function ExecuteNonQuery(
    storedProcedureName : String, 
    ... parameterValues : Object[]
) : int

Parameters

  • storedProcedureName
    Type: System.String

    The name of the stored procedure to execute.

  • parameterValues
    Type: array<System.Object[]

    An array of paramters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure.

Return Value

The number of rows affected

See Also

Database Class

ExecuteNonQuery Overload

Microsoft.Practices.EnterpriseLibrary.Data Namespace

IDbCommand.ExecuteScalar()