Hey guys looking to name the "tables" in my dataset which is populated from a SqlClientStoredProcedure which is the combination of 4 child stored procedures.
Instead of just going by "Table" and "Table2" etc in my code I would like to insure I am working with the correct table/set by naming each sp return set on the db side if possible without getting too hacky or if there's a sure way on the code side then that will suffice.
I read some techniques which I don't prefer like adding an extra field or row etc in the sp.
Somehow it just seems wrong to be referencing it by the generic name in code.
Thanks
Instead of just going by "Table" and "Table2" etc in my code I would like to insure I am working with the correct table/set by naming each sp return set on the db side if possible without getting too hacky or if there's a sure way on the code side then that will suffice.
I read some techniques which I don't prefer like adding an extra field or row etc in the sp.
Somehow it just seems wrong to be referencing it by the generic name in code.
Thanks
Code:
using (SqlClientStoredProcedure sp = new SqlClientStoredProcedure(sql, BLSettings.WebConnectionString))
{
using (DataSet ds = sp.ExecuteDataSet())
{
estimateMetrics = convertToERLHealthMetrics(ds);
}
return estimateMetrics;
}
Code:
convertToHCMTasksProcessed(dataSet.Tables["Table"], estimateMetrics);
convertToHCMFailedTranslations(dataSet.Tables["Table1"], estimateMetrics);
//...
//...