May 28, 200421 yr This may be a stupid question but i can't seem to find the answer. I have a Microsoft Access db that my FileMaker db reads from and writes to. I want to count the number of records in the Access db before i write to it. The only way i can think of doing this using the Execute SQL statement with the following query: SELECT COUNT ("GUN_ID") FROM "PLAYERS_1" Gun_Id is the first field in the Access table and Players_1 is the table name. It executes without errors but i don't know where the returned value goes. Is it held in memory? How do i get the record count into a field in my FileMaker db? The Access db is on a remote server and i access it from FileMaker via a data source using the Microsoft Access Driver. Any help at all would be great. And i applogise again if this is a painfully obvious question
June 9, 200421 yr Newbies Here is what we did for this type of problem. Use the 'Import Records' script step instead and import the data into a global field. Here are the steps: 1) Create a global number field (gSQLCountResult) 2) Create and script which does an Import Records from an ODBC source 3) Set the SQL statement in the script to be something like "SELECT count(article_id) from articles" or create a calculation that has this for each possible article. 4) Map the selected count field from SQL to the FileMaker field gSQLCountResult. Now run the script and you should have the number of matching records in the gSQLCountResult field which you can use to determine whether you need to update or insert. -Mike
June 10, 200421 yr Author Hi Mike, I actually figured it out after a lot of trial and error and did it the same way as you suggested. It's good to know i got it right. Thank you very much Veqtor
Create an account or sign in to comment