User-829096311 posted
Hi
I am use this code to create a calendar and bring the event from access database but i get a repeated values
Dim output As String = ""
Dim date1 As Date = #01/01/2018#
Dim days As Long = DateDiff(DateInterval.Day, date1, Now())
For i = 0 To days - 1
Dim date2 As Date = date1.AddDays(i)
Dim rdr As OleDbDataReader = DirectCast(AccessDataSource1.[Select](DataSourceSelectArguments.Empty), OleDbDataReader)
While rdr.Read()
If CDate(rdr("thedate")) = date2 Then
output += rdr("thedate") & " " & rdr("event") & "<br>"
Else
output += date2 & "<br>"
End If
End While
rdr.Close()
Next
lblOutput.Text = output
But every date is repeated by the number of events