Results 1 to 3 of 3

Thread: Pls help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2004

    Pls help

    To all,

    I made a simple program that has file maintenance. every time i add a record it has a unique transaction id. There are possibilities that two or more users will use this system at the same time. My problem is the transaction id of the said systems is dependent on the last record entry. The possible results of these are duplication of transid records. Transaction id should be unique for each record. How can i avoid this mistake? Do you have a working code for this???

    Last edited by Chowking; Sep 6th, 2004 at 12:22 AM.

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    I dont get what you are asking? Can you explain a bit more?

  3. #3
    Hyperactive Member dRAMmer's Avatar
    Join Date
    Oct 2001
    Use identity for that transaction id, if it's too late, when saving your record, check first if the TranID to be save exist, if yes increment it by one and (re-check again if it is okay to be save, do so until it is safe) then have that (script generated) TranID return to the user. In this way your code is flexible in a sense that, if you can't save the record because of a duplicate TranID, you can generate a new one, and return it to the user.
    live, code and die...

Posting Permissions

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

Click Here to Expand Forum to Full Width