Milliseconds in Access?

  • Thread starter Thread starter mscertified
  • Start date Start date
M

mscertified

I looked in Access help and could find few details about date/time columns. I
am using a date/time column as a primary key and want to minimize the
possibilitiy of duplicate inserts. As far as I can tell, it is only accurate
to hundredths of a second. Is that so?
 
The Timer function returns values to the 1/100 of a second, so you could use
a TimerValue field in conjunction with a Date/Time field.

Not sure why you would want to use this as PK though. Don't want to get
into a drawn-out discussion of natural vs artificial keys, but I like to keep
my PKs simple.

If you really need to use a datetime field as your PK, you could ensure you
won't have duplicates but adding some error handling to your routine, so that
if an insert violates the PK and fails, your app captures the error and then
reattempts the insert.

Dale
 
Back
Top