9 Replies Latest reply on Mar 13, 2014 11:28 AM by Stephen Huston

    External data source repeatedly not found

    duncanbaker

      Hi folks

       

      I was just looking at someone's solution and upon opening one of the files it said the data source could not be found. Dialog popped up to look for it and I would point it to the correct file (which is in the same folder as the one looking for it). File opened as normal and manage database was fine. Then I'd close the file and reopen and it would ask again. I did the same thing. Then went to manage data sources and checked the file that was referenced there - it was correct - file:filename.fp7. No need for directories etc as it's a relative path. So I edited the data source, deleting what was there and browsed to the location of the file and selected it. Clicked ok etc and closed the file. Open the file and it again asks for the data source for that one file.

       

      I'm thinking the file might be corrupt (probably the one I'm opening that is looking for the other file), but wondering if anyone else has come across this or any other things to try.

       

      Thanks.

        • 1. Re: External data source repeatedly not found
          Mike_Mitchell

          Most likely, it's executing a script where the reference is incorrectly defined. Check the OnFirstWindowOpen trigger. See what script is running. There's probably an external script being executed that's pointed to a deleted external source. Point it back to the correct source and it should fix the problem.

           

          HTH

           

          Mike

          • 2. Re: External data source repeatedly not found
            duncanbaker

            Thanks Mike. I had the debugger open prior to opening the file and the prompt comes up before the script even begins to run. It's FMP11 so there's only OnOpen.

            • 3. Re: External data source repeatedly not found
              Mike_Mitchell

              Then check the Relationships Graph. There's probably a TO on the graph that points to a deleted External Source.

              • 4. Re: External data source repeatedly not found
                duncanbaker

                Yup, did that too. After opening and pointing to the correct file, the manage database opens fine, and i opened up every single TO and ensured it was pointed to the file that I picked when opening. None of them had 'data source missing'. Then closed the file and on opening again it can't find the file.

                • 5. Re: External data source repeatedly not found
                  Mike_Mitchell

                  What about a trigger on a layout?

                   

                  Or maybe a calculation field that's being displayed on a layout?

                   

                  Did you run a DDR and search for ""?

                  • 6. Re: External data source repeatedly not found
                    Stephen Huston

                    I note that your data source includes the file format ".fp7" in the file name.

                     

                    Is this being run in FMP11 or older, or has it been converted?

                     

                    Either way, try editing out the ".fp7" from the file reference and see if that makes a difference. I have seen this problem with runtimes using a different extension than fp7, and found that no extension was necessary for the filepath to work. Also check for any extra or missing "/"s in the filepath(s).

                     

                    Also, check that no single target file is referenced with different filepaths from the same file. If there are mutliple data references to a single file, consolidate them by editing the  TOs  to use a common data source.

                    • 7. Re: External data source repeatedly not found
                      duncanbaker

                      Pretty sure I checked for triggers on layout but will double check - again though, this 'missing file' dialog pops up before any scripts are executed. Not sure on the order in which things are done but my sense is it's a relationship based issue.

                       

                      Calc field - again I'll check but the layout is just a bunch of buttons.

                       

                      I did run a DDR and when I first ran it it asked for the file location - at which point I hit cancel because I wanted to see what it wouldn't reference, but nothing looked out of place. I'll run it again though in full.

                      • 8. Re: External data source repeatedly not found
                        duncanbaker

                        It is in FMP11 yeah. I have tried with or without .fp7 in the filename, and picked the filename in manage data sources. The file is in the right place, and accessible, just every time the first file is opened it requests the location of the other file.

                         

                        I did open every TO in the RG and check that it was using the right data source. And they all seemed to be.

                         

                        It's a weird one. I'll get the DDR and dig through more deeply.

                        • 9. Re: External data source repeatedly not found
                          Stephen Huston

                          If, in fact, it is trying to use the external data source prior to executing any script, that means that either the closing layout or the opening layout of the file includes a field or object which draws information (possibly even via a defined calculation field) for a field or merge text object that requires data in the referenced file for it to display. That means there is a data source somewhere in the file(s) that is a problem.

                           

                          It's even possible that the first file is referencing the second file via a perfectly good data reference, but the second file has a self-referencing data source defined which is failing because of something as obscure as the file itself having been renamed without the self-referencing data source having been updated.