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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top