2 Replies Latest reply on Mar 8, 2010 12:11 PM by poertel

    any way to have the ExecuteSQL script step execute on the server?

    poertel

      Title

      any way to have the ExecuteSQL script step execute on the server?

      Your post

      I wrote a plugin function that calls the ExecuteSQL function internally. Works great on FMPro, and I want to see how well it works on FMS. For my particular application, I want the function to execute on the server. So I wrote a simple script that calls the function in a variable assignment step and made that a scheduled script. Script works ok, but when it hits the ExecuteSQL function call, server crashes.

       

      Some documentation I found says that the ExecuteSQL script step isn't meant to be run in scheduled scripts. Does that also apply to plugins calling the ExecuteSQL function? Is there any other way to get this to run on the server? I read a suggestion somewhere that by setting the value of an unstored calc field to my function, I can force the function to be run on the server, even when the value is requested by an FMPro client. Is that accurate? I tried that as well but I wasn't able to even verify that the function was executing that way. But I'll keep pushing in that direction if it should work.

       

      TIA, Phil

        • 1. Re: any way to have the ExecuteSQL script step execute on the server?
          TSGal

          poertel:

           

          Thank you for your post.

           

          The ExecuteSQL script step is not available through the server.  When you go into Manage Scripts and create a script, in the bottom left pop under "Show Compatibility", select "Server".  This will then display all script steps available through the Server.

           

          Please explain in greater detail what you are trying to accomplish.  There may be some forum members who have encountered the same problem and have a workaround.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: any way to have the ExecuteSQL script step execute on the server?
            poertel

            Thanks Gal.

             

            I shouldn't have titled the message that way. The rest of the message explains more clearly what I'm asking. Certainly the script step can't be used on FMS. My question is, does this also apply to the ExecuteSQL function in the plugin API? Believing that to be the case, I'm curious whether anyone has any workaround to cause ExecuteSQL (the C function in the Plugin API specifically, although success with the script step could point to a solution for the function call) to be executed on the server.

             

            Best,

            Phil