Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running a Script from a Schedule with ODBC import

Featured Replies

I have a script that i run that pulls records into a FM solution via ODBC connection.

 

I can run this script fine and the ODBC import works fine when i run it locally and manually run the script. But when i set the script to run via the scheduler from the server that it is hosted on i get an 802 error

 

Schedule "import lansweeper" scripting error (802) at "Inventory Dev 22APR2015 MASS UPDATE TEST : 0 Import Lansweeper Data : Import Records".

 

I can see the ODBC connection on the script. What is going on here?

 

Thanks!

 

ERik

Did you create a DNS with exactly the same name on the FMS machine?  Same name as the DSN on your local machine.

  • Author

I opened the server that file is hosted on. I gave ODBC 32 bit the same name in System DSN as the ODBC 64 bit system DSN....

 

now it is working perfectly!!

 

Thanks!!

  • 3 months later...

I am facing  exactly the same issue but on Mac OS.

The fix around 32-bit/64-bit doe snot seem to apply to Mac OS setup as per FileMaker's KB.

The most annoying part is that performing the same on FMS12 works great but fails on FMS13. 

I have sought support on the ODBC driver vendor's side but 802 is not an ODBC error...

Now I am stuck having to run this script manually instead of a schedule

Help Please!

The 32/64 bit thing only applies to Windows.

Are you sure the names of the DSN match exactly on your local machine and the FMS box?  On the FMS box, is the DSN in the System DSN tab?

Are you sure the names of the DSN match exactly on your local machine and the FMS box?

Yes: in this particular case I am running the FMP on the same box as FMS, so its the same DSN altogether.

On the FMS box, is the DSN in the System DSN tab?

Yes, System DSN.

Error 802 is "Unable to open file" - if this is a reliable error description. I guess that if the error was ODBC related the code would be 1400-1413. Therefore is it a problem with the file where the data is imported ? The script runs in a shell file which only has TO's pointing to another data only file. It could be a permission issue but I am running it all with [Full Access] Admin account and with "Full Access Privileges" in the script. Also, i tried importing to a table within the file itself and 802 still comes along the way.

 

Edited by laurentades
More details

What are you importing from?  What database and where is it?

Importing records from oracle 11g DB sitting on the same LAN (same Gb Swich...). It works perfectly fine when running from FMP....

Are you using PSoS or just a server-side schedule?

Both and with equal result...

Let me rephrase that : not using both in the same script but rather whether i use either i get the same result.

Ok, still thinking permissions issue.  If you use the same System DSN, and given that Oracle 11g is a supported ESS back-end, you can you add add a table or a view to a test database using ESS?

Yes, can add an ESS table from this source in relationship graph.

Made a script to add a record: works well when running from FMP. Generates no record when running PSoS from FMP or as schedule on FMS: weird thing : does not even return an error even though i did capture it in the script.

 

Another point for what it's worth:

I use the same DSN to get data back to Oracle using Execute SQL script step. Works fine with FMP, PSoS and Schedules...

Therefore issue would seem to be more around Import Records in relation with ODBC data source than DSN itself....

Ah, ah!

I am now trying a much more basic test : importing a table to my file from another file on the server : works ok on FMP and getting error 100 on PSoS/Schedule. I guess those errors 100 and 802 can correlate somehow but for the life of me I can't think of one reason why that would happen....

Ah, ah!

I am now trying a much more basic test : importing a table to my file from another file on the server : works ok on FMP and getting error 100 on PSoS/Schedule. I guess those errors 100 and 802 can correlate somehow but for the life of me I can't think of one reason why that would happen....

Hold on now, that's not relevant.  (Provided that you are trying to import from another FM file).

FMS can not be a client so it can not import from another FM file, that's not supported.  It can import from other types of files (including ODBC sources) but it can not import from a FM file.

Hmmm, ok... now I remember this fact. So the 802 issue still remains

Ok, looks like I managed to pin it down:

Error 802 does indeed relate to a file (data source) wich FMS cannot open in this case and as Wim Decorte was thinking it is a permission issue.  And indeed on the ODBC data source side rather than the target import FM file.

After lots of thinking i just thought about checking credentials in the OS X keychain to see that upon initial DSN setup and test, the ODBC Manager only kept credentials in the session keychain and not in the system's. Copying the keychain item across to the system keychain simply solved the issue which in the meantime caused me to lose the few hair i had left on my head as my avatar shows it...

Not sure whether that was so obvious but I cannot remember having to watch this specifically on earlier setups...

As a side message to whom it may concern -  FM Dev or ActualTech Dev - logging the authentication exception somewhere in logs would have been helpful.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.