variable parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
if i have a function that i'm passing the name of a stored procedure to and
i don't know if the stored procedure is going to have parameters or not
what's the perferred way to handle this or pass this?

thanks,
rodchar
 
if i have a function that i'm passing the name of a stored procedure to
and
i don't know if the stored procedure is going to have parameters or not
what's the perferred way to handle this or pass this?

List<SqlParameter> lstSqlParameters = new List<SqlParameter>();

Inside the function, implement foreach on the lstSqlParameters variable. If
it contains any, they'll be processed - if not, the rest of the function
will just continue...
 
Back
Top