In my asp.net+vb web with access database. There is a label (messagetxt) in my default.aspx page. The table named Birthday contains the date of Birth of the persons of our group.
i am willing to display a message to persons whose Birthday comes on that day (ie day(now() & mionth now()) . as "Happy Birthday Mudassar"
Table name is Birthday
Field are Name, DOB
Dim con As New OleDbConnection
con.ConnectionString = ConfigurationManager.ConnectionStrings("baijuepConnectionString").ConnectionString
Dim names As String = ""
names = "Select Name, DOA from birthday where Month(DOA)=Month(now()) And Day(DOA)=Day(now())"
Dim cmd As New OleDbCommand(names, con)
con.Open()
Dim reader As OleDbDataReader = cmd.ExecuteReader()
Do While reader.Read()
names = names & " ," & reader("Name")
If names <> "" Then
Label7.Text = "Happy Birthday!" & names
End If
Loop