5 Replies Latest reply on Jun 28, 2017 2:10 PM by gofmp15

    When Script is Scheduled:  Error 3: Command is unavailable

    eworbit

      System: FM 15.0.3.308 Server on Mac using the Actual Tech ODBC to SQL Server.

       

      This is a snippet of the script which simply Truncates and Imports into a native FM table.  I do this on other nightly scripts on other tables and it works fine.  But this one gives me fits.

       

      Go to Layout ["tblHistory" (tblHistory)]

      Truncate Table [With dialog:Off; Table:"tblHistory"]

      Set Variable [$e; Value: Get ( LastError )]

      If [$e ≠ 0]

        log the error....

      Else

        Import Records [With Dialog:off; DSN: MyData; SQL Text: SELECT ....... ; Add; Mac Roman]

      End If

       

      Only when this script is ran from the Scheduler does it give me the Error 3.   If I run the script from the FM 15 Advanced client, then it works Truncates and Imports fine.   Another person on this forum had this same Error 3 problem a couple years ago but never got an answer so I'm starting a new thread.

       

      Since the error happens at the Truncate Statement and prevents proceeding to the Import Records statement, then this shouldn't be an ODBC issue - but a scheduler one.

       

      I made sure there was no incompatible script steps are in the script or the File Open triggers.   I will upgrade to FMS 16 soon to see if things get fixed.   I never have easy problems!

       

      -Eric