Jump to content
Server Maintenance This Week. ×

Triggering a FM Export


This topic is 5731 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am using a FM database as an data enrichment system within a MS eCommerce environment. One of the things I need to do is export updates on a nightly basis. On top of this whole thing, we will have a "general manager" controlling the imports, via ODBC and export updates. From what I can tell there may be two options: 1) write a VBScript to actually export the data itself, 2) write a VBScript to trigger a FM export script.

Any ideas on what is the best solution? I am not very familiar with VBScripting.

Thanks,

Link to comment
Share on other sites

Open notepad and save the following as "filename.VBS", changing the Path, UserName,Password, and ScriptName.

Set WshShell = WScript.CreateObject("WScript.Shell")

Set objFM = WScript.CreateObject ("FMPRO.Application")

    Set objFMfiles = objFM.Documents.Open("C:yourpathyourfile.fp7","username","password") 'open FM file

    objFM.Visible = True ' show FMPro                      

    objFMfiles.DoFMScript ("NameOfYourScript") ' call this FM script

WScript.DisconnectObject(objFM)

WScript.Quit(1)

But there may be an even easier solution....

Have windows task scheduler open a filemaker file and set the export script to run when the file is opened. No vbs needed. :smile2:

Link to comment
Share on other sites

  • 1 month later...

This topic is 5731 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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