2 Replies Latest reply on Oct 4, 2013 7:06 AM by FilipeTeixeira

    Move records



      Move records


           Hey :)

           I've been struggling with something and well I think I've searched everywhere to find no solution.

           I have 2 tables. One with distributors, and another one with instruments. Each instrument is related to a specific distributor and a distributor can have several instruments assigned.

           What happens is that sometimes an instrument might be assigned to another distributor, already on our database. How can I change that? I tried to change the key field and the distributor name field but instead of adding it on a already existing one, it creates a new one.

           Any ideas on how to solve this?


           Thank you

        • 1. Re: Move records

               It would appear that you edited the wrong field--perhaps a field from distributor instead of instrument.

               If you have this relationship:


               Distributor::__pkDistributorID = Instruments::_fkDistributorID

               Then changing the value of _fkDistributorID to a different value should link that instruments record to a different distributor and should not create a new record. But editing __pkDistributorID might. And the distributor name field should be defined in Distributor, not Instruments and thus should not be changed when assigning a record in Instruments to a different distributor.

          • 2. Re: Move records

                 Hey Phil :).

                 That solved it indeed. Thank you so much :).