4 Replies Latest reply on Jun 22, 2012 8:00 AM by Mike_Mitchell

    Run scheduled scripting from existing FM database on the FM Server 11

    frenta

      I am getting errors (102), (4), (101), (800), and (100) from the FILEMAKER Server 11 when I try to run a script from my database TSIC.

      I run the same script from the client FILEMAKER Pro 11 and I have no problem with it.

       

      Error (102) "TSIC database : Find Active Students : Go to Field " {I am not using this command at all on my script}

      Error (4) "TSIC database : Find Active Students : Print Setup " {I am not using this command at all on my script}

      Error (101) "TSIC Database : Server Sync with database external : Go to Record/ Request/Page " {I use this on a Loop until end of file}

      Error (800) "TSIC Database : Server Sync with database external : Export Records " {It is Server compatible but I get an error}

      Error (100) "TSIC Database : Server Sync with database external : Import Records" {It is a Server compatible command also!}

       

      When I wrote the Script in the databse TSIC , I set the Script mode to SERVER so that I could only use the Server compatible commands.

       

      Any help here ?

        • 1. Re: Run scheduled scripting from existing FM database on the FM Server 11
          Mike_Mitchell

          Hello, frenta.

           

          The first thing I would say is that the script you posted isn't the script that's being executed by the server-side schedule. The name of the script appears in the error message. So your error 102 and 4 are coming from the script "Find Active Students". Similarly, errors 101, 800, and 100 are coming from "Server Sync with database external". I'd start by looking at those scripts.

           

          Next, error 4 is "Command is unknown". Probably because it's not Server compatible. So that should be easy to clear up.

           

          Error 102 is "Field is missing". Probably because the field isn't on the layout the script is on when it's at that point in the script. This can often happen when we forget to put an explicit Go to Layout step in the script when it's being executed server-side.

           

          Error 101 is "Record is missing". This is normal when you hit the end of a loop. FileMaker always throws this error when it hits the last record on a Go to Record / Request / Page. Ignore it.

           

          Error 800 is "Unable to create file on disk". This is probably because you need to specify an explicit path for Server. (This is different from the desktop client.) The best way to do this is to use either Get ( DocumentsPath ) or Get ( TemporaryPath ) and then concatenate the name of the file with that in a variable. Then, do your export using the variable name.

           

          Error 100 is "File is missing." Well ... not to hard to figure out. If it can't create the file, then it probably is missing when it went to import from it. 

           

          HTH

           

          Mike

          1 of 1 people found this helpful
          • 2. Re: Run scheduled scripting from existing FM database on the FM Server 11
            frenta

            I thank you so much for your help.

             

            I had been frustrated for more than 6 months dealing with this issue. I am trying to keep 2 databases synchronized at least

            once a day. The main database is in Miami and hosted on a virtual server for our agency (we procure scholarships for poor

            children and do mentoring at a state wide level - www.TakeStockInChildren.org ) the other database is hosted by Datatrium

            in Canada and works as a Web database accessible by mentors to register the hours that they spend with the students.

            I must keep both database synchronized to register new students and new mentors and the relationship among them to be

            able to capture the number of sessions and minutes. Those sessions are simultaneously reflected in our database here

            in Miami because I include the tables from Canada in my Relationship mapping here in Miami.

             

            For the first time I was able to download the 3 main Excel files that I export from the Active Students,  The Mentors and the

            Mentor/Mentee link table I use in Miami to link mentors to students ! Thanks to you.

            But when I tried to IMPORT those files to the Canada side, I get the (723) error {You do not have permission to modify records

            to the target table } even when I am doing the refresh to the tables that show up on the Miami database (that are existing

            in Canada database site). What permission needs to be match ? The Venturian with Datatrium ?

             

            In your comments you mentioned that the first Script that runs is the Active Student and this I noticed before and was not

            able to explain because as you can see on the attached Server Schedule file I am attatching this is not the script that I am

            calling at all. I review the set up and it is OK. I did run that script before but I substituted it with a correct version and split

            the original script into 3 parts that are the

            1. Synchronize data with DATATRIUM part 1 {copies the Active Student table from Miami to Canada}

            2. Synchronize data with DATATRIUM part 2 {copies the Mentor table from Miami to Canada}

            3. Synchronize data with Datatrium part 3     {copies the Mentor/Mentee link table from Miami to Canada}

             

            I ended DELETING the entire Schedule (in case there was some memory resident program on the SERVER) and recreating

            the whole thing again. But, when I ran the first batch I was able to Export the files but was not succesful at reading them

            (Error 723).

            See included .bmp files.

            • 4. Re: Run scheduled scripting from existing FM database on the FM Server 11
              Mike_Mitchell

              frenta -

               

              The 723 error indicates there's a problem with the account the server-side schedule is using to log into the database on the Canada side. On every schedule, as you probably know, you have to define an account an password that exists in the database where the script is to be run. What's happening is the account you're using doesn't have permission either to edit or create records in the target table in the database where you're trying to import the records.

               

              You need to do one of two things:

               

              1) Modify the account permissions in that database so the account you're using has both Edit and Create privileges.

              2) Use a different account that has those privileges.

               

              HTH

               

              Mike

              1 of 1 people found this helpful