?
Solved

Changing a Database Field on a Timer

Posted on 2011-09-25
2
Medium Priority
?
152 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 300 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

809 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