4 Replies Latest reply on Jan 7, 2017 2:35 PM by embeco

    Changing Table Field Names With A Script

    embeco

      The latest version of my program involved changing the names of some fields in several tables. The way that I upgrade my user's program is to Export all of her files, replace the program and Import her files back into the new program. I will be faced with having to change the field names in her current database before I can import them into the new program.

      Is there a script command to alter the names of fields in a database? Are there other ways of altering field names with a script? (I do not know SQL or MSB??)

        • 1. Re: Changing Table Field Names With A Script
          wimdecorte

          The only way it can be done from inside FM is through a plugin that supports all SQL functions.  Then you can use ALTER to change field names.  Kinda dangerous sometimes.

           

          You can do it from outside FM through the xDBC interface too.

          1 of 1 people found this helpful
          • 2. Re: Changing Table Field Names With A Script
            embeco

            Thanks for your reply,

             

             

             

            I think that I will:

             

            1.     Get the latest copy of the client's data (thank goodness I only have

            one)

            2.     Bring it in to the current production application on my PC (with

            FileMaker access)

            3.     Make all of the changes to the database (again)

            4.     Export the data

            5.     Update the client's PC (runtime) to the latest version

            6.     Import the changed database

             

             

             

            Kind of labor intensive but it seems to be the only way available to me (no

            SQL and I don't know what the xDBC interface is - but I will look it up).

             

             

             

            *     Old Dog Allergic To New Tricks

            • 3. Re: Changing Table Field Names With A Script
              philmodjunk

              When you import data from the old version to the new, you don't have to have identical field names. It can be tedious, but you can script a series of import records script steps where you manually align the fields so that fields that have been renamed align with the field of the original name in the older file.

              • 4. Re: Changing Table Field Names With A Script
                embeco

                Altering the Import commands is easier than my way (I'll just have to

                remember to change it once on the new program). You saved me again. Thanks.