September 5, 201312 yr I have an scripted import (FM 12 Adv) that updates the current version of my application with whatever the prior version the user is using prior to getting the current version. As part of that script I know the Source::$$Path (including the filename) ... and I know the Source::$$Filename . These GLOBALS change depending on what file the user chooses to import. It seems that ExecuteSql *requires* the source table for the import 'Be On The Relationship Graph' before it can execute any commands. True? If so, how do I get (the unknown) $$Filename into the Relationship Graph so I can use ExecuteSQL? Also, FM does not seem to allow me to script the use of DataBaseNames, FieldNames, TableNames or even OpenFile without the Source being Open. So, I am looking at ExecuteSQL but it REQUIRES that the Source be on the relationship graph. How do I get $$Filename onto the relationship graph? Surely I am not the first person to run a cross this problem? Perplexed and hoping you can help... Ron =======sep 4, 2013======= PS. Wim stated: To answer you question: yes, before you can select anything from a table, that table (TO really) needs to be on the graph of the file you are in when you make the ExecuteSQL You don't need to "get $$filename" on the graph", that part does not make sense. Kindly post the full scenario and the SQL statement that you are executing. Yes, that is the problem. I do not see any way to get my unknown table ($$Filename) on to the graph. How do you do it? I can not post my ExecuteSQL statement because ExecuteSQL *REQUIRES* that I have $$Filename on the relationship graph before it will all me access to $$Filename's features. Again, since I don't know how to get $$Filename on the graph, I can not use ExecuteSQL.
Create an account or sign in to comment