Mediachase FileUploader.NET 1.9 Framework Help

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

Execute a stored procedure via a SqlCommand (that returns a 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 ExecuteDataset( _
   ByVal transaction As SqlTransaction, _
   ByVal spName As String, _
   ParamArray parameterValues As Object() _
) As DataSet
[C#]
public static DataSet ExecuteDataset(
   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

a dataset containing the resultset generated by the command

Remarks

This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: DataSet ds = ExecuteDataset(trans, "GetOrders", 24, 36);

See Also

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