Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Posts
    5

    Unhappy Unanswered: Retreiving updated records old data in Access File

    Hi,
    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.

    Thanks

    M

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    no
    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

  3. #3
    Join Date
    Jun 2006
    Posts
    5
    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.


    Thanks
    M

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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.

    effectively thats
    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....
    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

  5. #5
    Join Date
    Jun 2006
    Posts
    5
    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

    Manoj

  6. #6
    Join Date
    Jun 2006
    Posts
    5
    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.

    Thanks

    Manoj

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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

  8. #8
    Join Date
    Jun 2006
    Posts
    5
    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.

  9. #9
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Correct; access is not as clever as that.

    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.
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •