Mediachase FileUploader.NET 1.9 Framework Help

SqlHelper.ExecuteNonQuery Method (SqlTransaction, String, Object[])

Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified SqlTransaction using the provided parameter values. This method will query the database to discover the parameters for the stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.

[Visual Basic]
Overloads Public Shared Function ExecuteNonQuery( _
   ByVal transaction As SqlTransaction, _
   ByVal spName As String, _
   ParamArray parameterValues As Object() _
) As Integer
[C#]
public static int ExecuteNonQuery(
   SqlTransaction transaction,
   string spName,
   params object[] parameterValues
);

Parameters

transaction
a valid SqlTransaction
spName
the name of the stored procedure
parameterValues
an array of objects to be assigned as the input values of the stored procedure

Return Value

an int representing the number of rows affected by the command

Remarks

This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: int result = ExecuteNonQuery(conn, trans, "PublishOrders", 24, 36);

See Also

SqlHelper Class | Mediachase.FileUploader Namespace | SqlHelper.ExecuteNonQuery Overload List