Solved

Changing a Database Field on a Timer

Posted on 2011-09-25
2
142 Views
Last Modified: 2012-05-12
Hi, I need to change a field in a sql database on the 1st day of every month, bascially resetting a flag. I have 5 users in my system so after the field has been changed by the first logged in user, I need to check it doesnt get reset again until the 1st of the following month.

Hope this makes sense, any help is appreciated,

Thanks
0
Comment
Question by:SCOTT78
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 75 total points
ID: 36595774
Add a field in the same table or in another table to record the month.

When a user login, check if that if that field contains the current month.

If yes, do nothing.

If no, they this is the first logging in the month. Reset your flag and then update the month to the current one.

In fact, depending on how you use your flag, the field with the month could become your flag.
0
 

Author Closing Comment

by:SCOTT78
ID: 36598969
Simple method, just what I neeed. Many Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now