Dotnet-Project Framework documentation.

GenericDataHelper.FillDataset Method (String, DataSet, String[], Object[])

Execute a stored procedure via a Command (that returns a resultset) the database 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.

public static void FillDataset(
   string spName,
   DataSet dataSet,
   string[] tableNames,
   params object[] parameterValues
);

Parameters

spName
The name of the stored procedure
dataSet
A dataset wich will contain the resultset generated by the command
tableNames
This array will be used to create table mappings allowing the DataTables to be referenced by a user defined name (probably the actual table name)
parameterValues
An array of objects to be assigned as the input values of the stored procedure

Example

This method provides no access to output parameters or the stored procedure's return value parameter.

FillDataset(CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, 24);

See Also

GenericDataHelper Class | DotnetProject.Data Namespace | GenericDataHelper.FillDataset Overload List