I have this function that is not working. I have 22 records in my database in the SurveyName table.
I have this method
Private Function SearchSurveys() As List(Of SurveyDisplay)
Dim conn As New SqlConnection(WebFrameworkConnection.GetConnectionString)
Dim stmt As New SqlCommand("Select [surveyname],[ID],[SurveyType],[ActivationDate],[DeleteDate],[PostedOn],[TimesTaken] from [surveyname] where [PostedOn]>=@StartDate and [PostedOn]<=@EndDate", conn)
stmt.Parameters.Add("@EndDate", SqlDbType.DateTime).Value = EndDatePicker.SelectedDate.Value
stmt.Parameters.Add("@StartDate", SqlDbType.DateTime).Value = StartDatePicker.SelectedDate.Value
Dim list As New List(Of SurveyDisplay)
Try
conn.Open()
Dim result As SqlDataReader = stmt.ExecuteReader
While result.Read
Dim item As New SurveyDisplay
...
Go to the complete details ...