Get back the old values RRS feed

  • Question

  • I am giving the scenario below...
    it was an interview Question.can any one plz  tell me the result?

    I am accessing the the table values based on orader_no..it will give 5 results..
    so i decided to delete the 5 record ..and insert the new values(3 record)
    another user also accessing with same order_no..He also received same set of results (5 rec)...after thet  he got the msg displayed like
    "Another user is in transaction"....

    1 st user click "save" option..so last 3 records has been saved successfully

    when the second user search  with same ordre_no...he got only 3 records which was inserted by 1 st user...

    how to get back the old values


    Monday, November 9, 2009 6:16 AM


  • Hello

    You can't actually "get the old values back" unless you have stored them somewhere.  This question is most likely to be aimed around transactional isolation.  I am not quite sure your interviewer was trying to achieve out of this question.   It's most likely that they wanted you to say something about isolational or transactions in general but the problem is the user is involved and you never want to leave transactions open while you wait for a user to do something (this causes blocking on the tables).  Maybe it was a trick question.

    Hope this helps

    • Marked as answer by goms Monday, November 9, 2009 6:33 AM
    Monday, November 9, 2009 6:30 AM