pablo_tx Posted July 7, 2008 Posted July 7, 2008 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,
aholtzapfel Posted July 7, 2008 Posted July 7, 2008 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:
pablo_tx Posted July 7, 2008 Author Posted July 7, 2008 Thanks. The execute script on open is something that a friend suggested. :
Wim Decorte Posted August 22, 2008 Posted August 22, 2008 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.
Recommended Posts
This topic is 6028 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 accountSign in
Already have an account? Sign in here.
Sign In Now