Birthdays in ASP.NET

M

Mark Scott

Hi

I have limited experience with ASP.NET but have had an idea for a
functionality I would like to add to our intranet site.

I would like to put an announcement on the front page when a member of staff
has a birthday by searching through the staff db (around 250) for a match of
todays date.

I am not expecting a full listing but any pointers would be welcomed (I
already have the connect string I can use from another form)

Regards

Mark
 
M

Mark Rae [MVP]

I have limited experience with ASP.NET but have had an idea for a
functionality I would like to add to our intranet site.

I would like to put an announcement on the front page when a member of
staff has a birthday by searching through the staff db (around 250) for a
match of todays date.

I am not expecting a full listing but any pointers would be welcomed (I
already have the connect string I can use from another form)

Fetching the data is simple enough... You don't specify which RDBMS you're
using, so I'll assume you're using SQL Server....

SELECT * FROM StaffTable
WHERE DAY(DateOfBirth) = DAY(getdate())
AND MONTH(DateOfBirth) = MONTH(getdate())

Fetch the data into an ADO.NET object (e.g. DataSet or SqlDataReader) and
iterate through it as required...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top