Veqtor Posted May 28, 2004 Posted May 28, 2004 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
Newbies Mike Gorski Posted June 9, 2004 Newbies Posted June 9, 2004 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
Veqtor Posted June 10, 2004 Author Posted June 10, 2004 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
Recommended Posts
This topic is 7469 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