Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:57:23+00:00 2026-06-03T16:57:23+00:00

I have a program that uses a licence system for its users. Now I

  • 0

I have a program that uses a licence system for its users. Now I have an integer column LicenceDays in my database, and I would like to decrement that value every 24 hours by 1. So lets say for example my LicenceDays is at 4, after 24 hours make an update to the database and it will be at 3.

Now I don’t get how I would go about that. Where do I start? Can I achieve this in Sql Server itself, or could I use some sort of code in my WPF C# Program? I’m using LINQ to SQL to access my database.

Any help would be appreciated, Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:57:26+00:00Added an answer on June 3, 2026 at 4:57 pm

    Since this is a recurring SQL task, probably the easiest and most maintainable solution would be to create a job within SQL Server itself. You can write your SQL statement that decreases “LicenseDays” by 1, and schedule it to run every 24 hours. You can even schedule, update and start/stop this using the GUI within SQL Server Management Studio.

    More info on SQL Server jobs: http://msdn.microsoft.com/en-us/library/ms190268.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# program that uses System.Data.OracleClient to access an oracle database. The
I have a vb.net program that uses mysql as its database. And it works
I have a program that uses GLUT for its OpenGL rendering. Now I need
I have a program that uses a Microsoft Access database for its back-end. I
I have a program that uses dateutil from the package index. I would like
I have a console-mode program that uses SQLite3 to maintain a database file. It
I have a program that I would like to run on just one CPU
I have a program that uses an external API which uses its own state.
I have a program that uses System.DirectoryServices.AccountManagement.PrincipalContext to verify that the information a user
I have a program that uses ansi terminal codes to do fancy stuff like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.