>I don't know if this is even possible in c#, but I would like to be able to read in the name of a Stored Proc into a variable and then call it via that variable name
>
>Something along the lines of
>
>string SPName = Globals.GetConfiv("HBCSPName");
>DataSet GVSet = {I'm assuming I'd need to cast it as something) SPName;
>
>How (if possible) would I do this?
Pretty straightforward (assuming you don't need parameters) since the relevant SQLCommand takes a string as the procedure name. e.g. using an SP to fill a dataset:
string SPName = "Test"
var command = new SqlCommand(SPName, conn);
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = command;
da.SelectCommand.CommandType = System.Data.CommandType.StoredProcedure;
DataSet dataset = new DataSet();
da.Fill(dataset);