have you tried a Pause script step in between imports to allow the data to "refresh"? Your time to pause may vary.
Is there an error generated on the 2nd import? Could it be that the context is not set correctly when you combine both imports in the same script?
Beverly and Wim's advice will probably help you more. But is this the same ODBC source or a different one? What ODBC driver are you using and version? What type of ODBC source is it (MS SQL Server? MySQL? Oracle?).
Personally I think the pause that Beverly suggested will fix your problem assuming you are not having a context issue.
Thanks very much for your input. I have tried adding a pause to the script and this has not made a difference.
The problem also occurs when the ODBC imports are run manually in succession so it doesn't appear to be a scripting problem. Following your logic I also tried waiting for 5 minutes before performing another import through the File>Import Records menu options. Again same problem unfortunately.
When I close the FM database straight after an ODBC import and then immediately re-login and perform another import this works. It appears that the FM database must not be releasing something correctly following an ODBC import.
As so how I get around this without asking the user to run an import, quit, run another import, quit, etc. I've no idea though!
For information it's the same ODBC source each time. It is an Oracle 11g database using an Oracle in OraClient11g_home1 driver installed via an Oracle client install.
There's no error generated, the import runs successfully however it doesn't update any records (using the show dialog options in import).
Out of curiosity, maybe try running both scripts at the same time in parallel?
I used to do a nightly update to FileMaker from Oracle with about 50 tables from the same ODBC source and it worked just fine. So something is wrong here.
Would you maybe share your script here so we could look at it to verify things like context?
Can you see the tables OK with ESS as a table occurrence?
1 of 1 people found this helpful
That's great thanks Taylor. The fact you've performed what I'm trying to do successfully means I'm doing something wrong which we can hopefully figure out!
When you say 'in parallel', how would I do this please? I've got one script that runs the two Perform Script options on successive lines but I don't know how I specify a parallel run.
No problem sharing a script however I couldn't see any options to export script and I coudn't find the physical file location as to where they would be stored. Could you help me out with this please?
I'm afraid I also don't understand your last sentence at all unfortunately, sorry
Apologies for my uselessness and many thanks indeed for your suggestions and patience. It's very much appreciated!
Did you try 'Show All Records' before second import ?
If you want to 'update' all records (not records imported on first import) you need it.
Good idea. I am actually performing the import into a different Filemaker database/table than the script is running on. I am going to create this script on the other database and then try a 'Show All Records' action before running the 2nd import. I'll let you know if this solves it! Thanks.
1 of 1 people found this helpful
You can print the script (as PDF) and copy/ paste to forum (makes it text so could be in email) or include as attachment (forum). altho, IIRC, attachments to this forum must be graphic (JPG, PNG, GIF).
Yay! Moving recreating the scripts in the same database that is being updated and performing a 'Show All Records' has sorted it. I did want to have the extract and import process I was using outside of the target database, but moving this into the same environment to get the imports working in succession successfully is a worthy sacrifice for me.
Thanks ever so much for your help and suggestions, I would not have been able to resolve my problem without you! Great community.