Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7469 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

  • 2 weeks later...
  • Newbies
Posted

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

Posted

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 smile.gif

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.