Hello everyone,
I need to record a set of data items. For each data item, users may modify to some new content. So, I plan to use a timestamp field for each data item to record the time when user modifies data item last time.
I am not sure whether I should use a simple integer value (like version information, which increase 1 each time when user modifies data item)
Which approach is better What are the advantages and disadvantages of each approach
thanks in advance,
George

about timestamp
CHOULANT Noham
seadur
Hi Alex,
Using such function requires hardware support I mean my computer has to have a high resolution timer/clock
regards,
George
ALFKI
roundandround
Windows Mobile supports this
regards,
George
MrZap
Thank you Chris,
You have given us a good point why timestamp is not very suitable. What makes me confused is that why even 100 nano-seconds is not enough to produce a difference It should be a *long* time for the computer. :-)
regards,
George
Hippunky
Thank you Alex,
Do you mean using timestamp is always better Actually, I do not have such requirements.
regards,
George
kmoreto
I tried to use the time stamp but found it did not work in my case. the problem I had was the process ran so quickly that retrieving the current date and time resulted in a lot of entries with the same time stamp. Even trying to get the ticks which should have been every 100 nanoseconds didnt give the desired result I even tried to add 1 second in the hope the string would be different but it wasnt. Could be my logic or my code
// create a time stamp
DateTime tStamp = DateTime::Now; //tStamp = tStamp.AddSeconds(1); __int64 ticks = tStamp.Ticks; // add time stamp to beginning of the stringString* tmStamp = ticks.ToString();
This was wrapped in a for loop with a read of data from a file before this everytime.
jxl98c
Yes, but I don't think that you can find computer which doesn't support this.