Why does viewing a MDB file change the modified date?

R

Randy K

This has probably been asked many times before but I haven't come up
with anything on google. Why does opening/viewing a MDB file change
the modified date? This implications as far as our backup stratgey
goes.

Thanks.
 
J

John W. Vinson

This has probably been asked many times before but I haven't come up
with anything on google. Why does opening/viewing a MDB file change
the modified date? This implications as far as our backup stratgey
goes.

Thanks.

The detailed "why" would require inside information as to the workings of
Access, but it's routine behavior. Access must keep track of... something...
user security, query stats, who knows what!

If you need to keep track of when data in your tables is updated, Access won't
help you; it neither tracks nor exposes that information. You'll need to track
it yourself, not an easy task unfortunately!

John W. Vinson [MVP]
 
T

Tony Toews [MVP]

This has probably been asked many times before but I haven't come up
with anything on google. Why does opening/viewing a MDB file change
the modified date? This implications as far as our backup stratgey
goes.

I suspect Access is either changing the query statistics or possibly
changing the form filter. I've noticed that you can use an app for a
few minutes and exit without changing the date/time. But any more
specific I haven't bothered to do any research.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tom van Stiphout

On Wed, 16 Jan 2008 01:32:51 GMT, [email protected] (Randy K) wrote:

It's just the way it is. The Access development team decided it was
the right thing to do.
Of course if you do a binary comparison of the file before and after a
simple Open (perhaps using fc.exe in a command window), you'll notice
that it has in fact changed. Perhaps some internal flags, perhaps a
new compilation state, we are not privy to those finer points.

So I would say if the Archive bit is set, better back it up.

-Tom.
 
D

David W. Fenton

The detailed "why" would require inside information as to the
workings of Access, but it's routine behavior. Access must keep
track of... something... user security, query stats, who knows
what!

Well, we do know at least one bit that needs to be written to, and
that's the SUSPECT flag that is set to OFF when the database is
successfully closed by Jet. I assume it's set to ON when the
database is opened and thus, when there's a bad shutdown, you are
prompted to compact/repair.
 
D

David W. Fenton

I've noticed that you can use an app for a
few minutes and exit without changing the date/time.

I don't think that's true, if you have it open in the UI. Of course,
assuming a front end/back end structure, it would be only the front
end that would get the date updated. The back end's date changes
only if you view a table.
 
T

Tony Toews [MVP]

David W. Fenton said:
Well, we do know at least one bit that needs to be written to, and
that's the SUSPECT flag that is set to OFF when the database is
successfully closed by Jet. I assume it's set to ON when the
database is opened and thus, when there's a bad shutdown, you are
prompted to compact/repair.

I disagree. I've had clients who have several times had a power
failure with about 15 - 20 users in the database. Upon restoring
power they were able to continue using the system without doing
anything. I was on site for those power failures. The server was
on a UPS but not the client workstations.

That flag is momentarily set while doing updates or inserts. Not when
you open the mdb..

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

David W. Fenton said:
I don't think that's true, if you have it open in the UI. Of course,
assuming a front end/back end structure, it would be only the front
end that would get the date updated.

That's not been my experience but I haven't done any serious reviewing
of that so I could be wrong.
The back end's date changes
only if you view a table.

Could be.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

David W. Fenton said:
I don't think that's true, if you have it open in the UI.

I just tried this on a non split app. The date/time of the file
didn't change until I opened a second filtered form.
Of course,
assuming a front end/back end structure, it would be only the front
end that would get the date updated.

On one app I just tried it did change the FE date/time but the only
operation done was that particular app automatically relinks the
tables.
The back end's date changes
only if you view a table.

Nope, I just opened a form against a table and then the linked table
directly without changing any data. The BE date did not change.

Tony

--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

David W. Fenton

I just tried this on a non split app. The date/time of the file
didn't change until I opened a second filtered form.

I just tried it on a split database. If I open the MDB and open no
objects, the date doesn't change. If I open even one object
(including a linked table), the date changes.
On one app I just tried it did change the FE date/time but the
only operation done was that particular app automatically relinks
the tables.

Seems to me that any operation that changes the objects in the front
end will change the date. Opening a linked table may update some of
the metadata stored in the table link, while opening forms/reports
changes something or other (maybe -- I didn't try it; might also
depend on whether or not the form has a recordsource or not).
 
T

Tony Toews [MVP]

David W. Fenton said:
I just tried it on a split database. If I open the MDB and open no
objects, the date doesn't change. If I open even one object
(including a linked table), the date changes.

Then our experience differs.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Top