July 7, 200817 yr 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,
July 7, 200817 yr 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:
August 22, 200817 yr using a VBscript gives you more error trapping and handling options though. Like being able to log the fact that the FM file can not be found or anything like that.
Create an account or sign in to comment