Access database modified date and time
-
-
Hi All, I have a access database. Whenever we open the database the date and time of the database file will be changed. If the user has modified the database ( any table updation ) then only the date and time of the file to be changed? How to do this?
Why would you want to do this? As Access stores the data on disk, it has to abide by the operating system rules on file modifications. If you need to check the date for datas sake, then this information should be on the tables themselves. In other words, you should supply created/changed fields which store the details of the time the data item was created/updated.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Hi All, I have a access database. Whenever we open the database the date and time of the database file will be changed. If the user has modified the database ( any table updation ) then only the date and time of the file to be changed? How to do this?
If you open a table in an Access database, even if all you do is open it and never run a select query or anything, then Access modifies the mdb file, so the file timestamp will change. That is the way Access works, and there is nothing you can do about it. As someone else has already pointed out, if you need to know when the data was last updated then you should build it in to your application in one way or another.
-
Why would you want to do this? As Access stores the data on disk, it has to abide by the operating system rules on file modifications. If you need to check the date for datas sake, then this information should be on the tables themselves. In other words, you should supply created/changed fields which store the details of the time the data item was created/updated.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
OK . How to get the date and time information of the table through ADO programming. I want to know when the date and time of the table is modified.
Did I not mention that they would be columns on the table? Just query that information.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Hi All, I have a access database. Whenever we open the database the date and time of the database file will be changed. If the user has modified the database ( any table updation ) then only the date and time of the file to be changed? How to do this?
I'm not sure how you would get table modifications, however getting RECORD modifications is a VERY simple excercise, you do have a number of options. ALL of them require additional columns/fields to be added to the tables you want to monitor. We monitor all tables so we have a Modified and ModifiedBy on all tables. Add a timestamp field to the table and trigger it every time a record is saved, I think you can trigger this in access, not sure anymore. From your UI pass in the userid and datetime whenever you write back to the database. In your update/insert query automatically gather the current user and the datetime and add then to the update/save
Never underestimate the power of human stupidity RAH