Birthdays in ASP.NET

Discussion in 'ASP .Net' started by Mark Scott, Sep 1, 2007.

  1. Mark Scott

    Mark Scott Guest

    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
     
    Mark Scott, Sep 1, 2007
    #1
    1. Advertisements

  2. "Mark Scott" <> wrote in message
    news:...

    > 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...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Sep 1, 2007
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Elmhorst
    Replies:
    2
    Views:
    693
    Bassel Tabbara [MSFT]
    Jul 8, 2003
  2. dave
    Replies:
    0
    Views:
    1,456
  3. John Howard
    Replies:
    2
    Views:
    730
    Amber
    Jan 12, 2004
  4. Ben
    Replies:
    3
    Views:
    1,535
  5. Veeresh
    Replies:
    3
    Views:
    575
    Veeresh
    Jul 10, 2004
  6. =?Utf-8?B?TWFya3VzIE1jR2Vl?=

    Migrating ASP.NET projects between VS.NET 2002 and VS.NET 2003

    =?Utf-8?B?TWFya3VzIE1jR2Vl?=, Dec 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    537
    =?Utf-8?B?TWFya3VzIE1jR2Vl?=
    Dec 6, 2004
  7. Andrea Raimondi
    Replies:
    1
    Views:
    730
  8. Amelyan
    Replies:
    2
    Views:
    368
    Amelyan
    Apr 25, 2005
Loading...