Database.GetStoredProcCommandWithSourceColumns Method
Wraps around a derived class's implementation of the GetStoredProcCommandWrapper method and adds functionality for using this method with UpdateDataSet. The GetStoredProcCommandWrapper method (above) that takes a params array expects the array to be filled with VALUES for the parameters. This method differs from the GetStoredProcCommandWrapper method in that it allows a user to pass in a string array. It will also dynamically discover the parameters for the stored procedure and set the parameter's SourceColumns to the strings that are passed in. It does this by mapping the parameters to the strings IN ORDER. Thus, order is very important.
Namespace: Microsoft.Practices.EnterpriseLibrary.Data
Assembly: Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll) Version: 6.0.0.0 (6.0.1304.0)
Syntax
public DbCommand GetStoredProcCommandWithSourceColumns(
string storedProcedureName,
params string[] sourceColumns
)
'Declaration
Public Function GetStoredProcCommandWithSourceColumns (
storedProcedureName As String,
ParamArray sourceColumns As String()
) As DbCommand
public:
DbCommand^ GetStoredProcCommandWithSourceColumns(
String^ storedProcedureName,
... array<String^>^ sourceColumns
)
Parameters
storedProcedureName
Type: System.StringThe name of the stored procedure.
sourceColumns
Type: array<System.String[]The list of DataFields for the procedure.
Return Value
Type: DbCommand
The DbCommand for the stored procedure.