I'm not sure why you are assuming that there would only be 1000 submissions per day? Any reason for limiting the last part to 3 digits/characters? Any reason to not try out a pattern like "yyyyMMdd-HHmmssS" which automatically handles the resetting for you?
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
you could store the day in a file and then when you run the program it checks todays date and compares it with the date in the file. if they are different then it starts a new set, however if they are the same then you read off the last transaction number (from a file again) and then continue adding from there.
sirlink99
Practically a Master Poster
661 posts since Oct 2010
Reputation Points: 45
Solved Threads: 19
My supervisor told me it would not reach 100 transaction per day.
I wish I had a dollar for every time a user told me "x will never happen" and then it did, after I shipped the code. Let's hope, for your code's sake, that your supervisor's business doesn't take off and become a big success.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
a user told me "x will never happen" and then it did, after I shipped the code
Same here.
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448