3 Replies Latest reply on Jan 7, 2011 4:04 PM by nolak37

    Import Not working correctly

    nolak37

      Title

      Import Not working correctly

      Post

      I created an import script in order to simplify things when i install a new version of my DB.

      This opens the old version, goes through each layout and runs the show all command, then does an import of each table in the DB.

      When the script is ran I look and compare the DB to make sure no records were skipped and there are always missing records.

      I ran the script debugger and looked at it step by step, everything went smoothly and all records were imported, however when i run the script without the debugger the same problem persists.

      Does Anyone have any ideas as to what might be happening?

        • 1. Re: Import Not working correctly
          nolak37

          Ok tried importing from a different DB and ran into the same thing, hopefully this will get me some sort of reply.

          Script looks like this:

          Go to Layout ["Addendum"]

          Import records [No Dialog; "OLDfile"; Add; Windows ANSI]

          Sort records [Restore; No dialog]

          Go to Record/Request/Page [Last]

          Set Next serial Value [Addendum::ID; SerialIncrement (Addendum ID ;1)]

          SCRIPT repeats the same for every table in the DB.

          My only thought since it works when the script debugger is checking is that maybe there is an import limit that i dont know of, or maybe the script is running to fast for the PC, I think I'll try breaking this up into different scripts and see if it makes a difference.

          • 2. Re: Import Not working correctly
            philmodjunk

            Use this type script all the time with no trouble. I can string together many different tabels and don't hit any limits.

            I don't get why it works step by step through the debugger and not when you just run the script. (Which is why I haven't posted any sugestions here.)

            A few things to check:

            Are you using the matching field names option in your import?

            Do you have any validation rules that specify a unique value?

            If the fields get misalinged during import--which can happen spontaneously during development if you don't specify matching field names, you might get duplicate values in that unique values only field and this would filter out some of your records during import.

            For More Information about this bug, see:    Data loss bug : Spontaneous and erroneous import matching of new fields in specified imports !

            This is one of many acknowledged bugs that can be found in the Known Bug List here in the Report an Issue section of the forum.

            It can also be downloaded as a database file from:   http://www.4shared.com/file/8orL8apk/FMP_Bugs.html

            • 3. Re: Import Not working correctly
              nolak37

              ok, split the script into 3 parts, added perform part 2 at end of part 1 and similarly part 3, worked perfectly, not sure what the issue was, I then creaded another script re-uniting the 3 parts and it works perfectly again, so im not sure what the problem was but everything seems to be running smoothly.

              no other script i have created has had a problen like this so im not sure what to make of it