5
Reply

Which method is best to pass parameteres in stored procedure. Using Hashtable input.Add("param1",value) or Parameters.Addwithvalues("param1",value)

    Parameters.Addwithvalues("param1",value)

    Parameters.Addwithvalues("param1",value)

    Parameters.AddwithValues is a better option check the following for reference http://weblogs.sqlteam.com/dang/archive/2008/02/18/Why-Parameters-are-a-Best-Practice.aspx

    Parameters.Addwithvalues("param1",value) is best.

    We should use "Parameters.Addwithvalues("param1",value)" to pass parameter in stored procedure. Because it is secure & easy to program.