Posted on: 2/6/2014 6:01:12 AM | Views : 520

Hey Guys, 
I have a datalist ('dlfiles') filtered by a dropdownlist ('ddlDate'). The code is working although instead of using a SQL query, I wanted to make it a stored procedure instead and call it in the application. This is the working code that needs to be altered
{ string conString = ConfigurationManager.ConnectionStrings["MNE"].ConnectionString; string query = "SELECT ID, Reference, Note from dbo.icfmbackup where DateAdded LIKE '%'+@DateAdded+'%'"; SqlCommand cmd = new SqlCommand(query); cmd.Parameters.AddWithValue("@DateAdded", ddlDate.SelectedValue); using (SqlConnection con = new SqlConnection(conString)) { using (SqlDataAdapter sda = new SqlDataAdapter()) { cmd.Connection = con; sda.SelectCommand = cmd; using (DataSet ds = new DataSet()) { ...

Go to the complete details ...