Database.ExecuteNonQuery Method (DbTransaction, String, array<Object>)

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Executes the storedProcedureName using the given parameterValues within a transaction 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
PublicOverridableFunctionExecuteNonQuery ( _
    transactionAs DbTransaction, _
    storedProcedureNameAs String, _
    ParamArrayparameterValuesAs Object() _
) As Integer
publicvirtual int ExecuteNonQuery(
    DbTransaction transaction,
    string storedProcedureName,
    params Object[] parameterValues
)
public:
virtual int ExecuteNonQuery(
    DbTransaction^ transaction, 
    String^ storedProcedureName, 
    ... array<Object^>^ parameterValues
)
publicfunctionExecuteNonQuery(
    transaction : DbTransaction, 
    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 parameters 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()

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.