OpenDatabase errors

  • Thread starter Thread starter Keith Tizzard
  • Start date Start date
K

Keith Tizzard

How do I find out which error numbers can be generated by the DAO
OpenDatabase method?

I had trapped 3024 and 3051, thinking that would be sufficient only to
find that a 3044 error was generated.

In general, how does one find out which errors can be generated from
any method?
 
Hi Keith.

Particularly with file-based operations, there are so many things that could
go wrong that you will not think of all of them. Even if you could,
Microsoft is likely to add extra error messages in the future, e.g. for
hot-swappable devices.

Just include error handling in your routine, and let it take care of the
errors for you. You may decide to trap and provide custom messages for a few
common ones you are aware of, but there is no point reinventing the wheel
and handing invalid file names and paths for possibly diverse storage
systems, the presence and necessary attributes (writability, lockability,
persistence, ...) of files, versioning and file format issues, time-out
issues with various media and networks, and dozens of other things that
could go wrong.
 
Back
Top