2 Replies Latest reply on Jun 28, 2013 8:34 AM by ninja

    Pass a primary key

    AgnieszkaWynar

      Title

      Pass a primary key

      Post

           I want to write a  script that will delete records and the primary keys so that when I create a new record the deleted key can be passed on to the new record. Any ideas on how to do it? Thanks!

        • 1. Re: Pass a primary key
          philmodjunk

               Why would you want to do that?

               Primary keys should be devoid of any "meaning" so making sure that the values used are unique should be all that's necessary.

               This could be done on a single user database for the last record or group of records created, but not if you delete the 4th record out of 500 created, but I don't recommend that you do so in multi-user systems nor do I recommend that you do so for a primary key.

          • 2. Re: Pass a primary key
            ninja

                 Please let me second Phil's suggestion.

                 Primary keys are things you don't mess with...the risk is simply too high, and you typically gain nothing for having done it.