Unanswered: Retreiving updated records old data in Access File
I have a VB6 application talking to Access DB. The program was suppose to do some audit tracking but due to a bug it didn't create data in Audit table. Is there a way i can retreive data which is updated (Old values) for 2 tables.
If there is a tool/utility i can buy please let me know.
there is no automatic way to do that in JET files.
the only way I can see that you could would be to refer to your backups and then do a compare between the live data, and the last backup which has the data pre audit file going wrong
Thanks for reply but the major problem is that data was inserted and updated after the backup and i need the changes during that updates. I am hoping there is tool which can find those changes in some kind of logs in MDB file.
JET doesn't do logs....
in which case RESTORE the backup to something else
I'd strongly suggest you copy your live data to somethign else
then link the tables from the backup into the copy of the live data
then join the two tabels to see what is different.
select <my column list> from <mylivedata> as L
left join <mybackupdata> as B on B<primary key>=L.<primary key>
where L.<Column1> <> B<Column1>
or L.<Column2> <> B<Column2>
or L.<ColumnN> <> B<ColumnN>
you could do it in a program and dum results out to a report eg
item X: col1 different, col4 different
item Y: col2 changed
and so on
Thanks for reply but my problem is that backup has empty table of A, the data was inserted in this table and then updated may be one or more. What i need is the what were the values when the data was inserted.
I will try the word thing but as back has empty table it will be inserts only.
Thanks everyone for replies. Real problem is we have a empty table in which users will insert and update records using vb6 program. Vb6 program was supposed to do some audit of changes on that empty table like new inserts / updates on inserted records etc. Due to a bug it didn't happened. Now i have a DB with records in that table but our users need to know what was values when the data was initially entered. I have final values. If i can find the inserted records (first inserted values) i will be fine. Any ideas.
as said before
go back to your last known back up
the do a comparison between that backup and our current live data
any difference between the backup and the live data is what you users have done.
the only real problem is that you won't know what users may have changed more than once (eg added a record, then edited the record since the last backup
no will you know if the users have edited a record since the last backup, and then re-edited it to remove any changes.
it depends what it is you are looking for, but it shoudl bne failry easy to identify what rows in the table have got changes (do a left join on the backup data)
if you need to specifically report what has happened then you may have to do a bit more work.
but outside of the backup there is no way I can see you be able to do what you want. if the backup is garbled or mangled then I'd suggest you grasp your network trolls firmly by the throat
Yes my real problem is that i want to know what users may have changed more than once (eg added a record, then edited the record since the last backup. so i am assuming i am out of luck
Thanks for replies.
If you wish to keep track of stuff like this then I suggest you up size to SQL Server or another RDBMS product; these allow you to use triggers and the like to program events when a record is created, updated or deleted.