Results 1 to 2 of 2

Thread: Want to update database automatically

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Dhaka, Bangladesh
    Posts
    102

    Want to update database automatically

    Dear Friends,

    I have developed an application using C#.NET and ASP.NET.
    Now I have a problem in my hand...
    I am describing a scenario as my problem.

    Lets think I have an field in my database(MS SQL Server) as joining date and also another field that contains service length( in no. of days).

    I want to update this service length every day automatically.

    How I can do that ?

    Is it possible from application server without running the application ?

    Have u any better suggestion in ur hand ? Pls Help me.

    --Rajib
    Dhaka, Bangladesh.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Want to update database automatically

    Isn't that redundant? You could simply calculate service length each time the value needs to be retrieved from the database, by adding the number of days since joining_date minus the number of weekends and holidays. You could create a UDF for this. IMEO, it's a waste to store this value in the database and have it updated every day.

    If you DO need it updated every day due to the fact that you might be stuck with that structure now, then you should look into SQL Server Jobs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width