Hi all,
I have to write Data Access Layer, with methods that will invoke stored procedures. I am thinking that if I write a method that accepts variable number of parameters and the procedure name, it will be able to call any stored proc. Something like this:
public DataSet CallProcedure(string StProcName, params object[] OArrParams)
{
DataSet DS = new DataSet();
return DS;
}
Do you see any issue with this approach?
Is there a better way of doing this?
TIA,
Sheila
I have to write Data Access Layer, with methods that will invoke stored procedures. I am thinking that if I write a method that accepts variable number of parameters and the procedure name, it will be able to call any stored proc. Something like this:
public DataSet CallProcedure(string StProcName, params object[] OArrParams)
{
DataSet DS = new DataSet();
return DS;
}
Do you see any issue with this approach?
Is there a better way of doing this?
TIA,
Sheila