Solved

Changing a Database Field on a Timer

Posted on 2011-09-25
2
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 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