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

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

Recommended Posts

Posted

I'm trying to write an SQL statement for the primary key, ContactID (a serial number). My SQL statement is "SELECT MAX(ContactID)+1 from CONTACTS" -- the statement works (as long as prevent user modification of ContactID is turned off), but it takes far too long to execute. Shouldn't adding a single record to filemaker with ODBC be fairly quick? I don't get it -- ContactID is indexed, so it should be a relatively simple procedure. Is there another SQL statement that I should be using for the primary key?

Posted

Again, I feel like I'm talking to myself. OK, a cash $$ prize for anybody who can provide the SQL statement for adding a new, unique record to FM from another source.

Posted

With OutlookConnect I am required to assign a primary key. Is there an SQL statement that would work with FM's internal numbering? Or with my serial numbers?

Posted

Using an agregation fonction with filemaker will make your request very slow.

So you better use something like select contactid from table_name order by contactid

  • 2 weeks later...
Posted

Actually, on further inspection, it doesn't work -- it overwrites the first record in FM. (And it does take a long time to execute.) What should I do instead?

  • 2 weeks later...
Posted

Are you still watching this thread? I can't say how you can speed-up that specific query, but I can tell you how I handled the new record entry from our web server.

In the table on my web server (MySQL) I added a field called "upload_date" and set it to a null value upon creation of the record in MySQL. Then, in FileMaker I created a script to import new records using ODBC and selected only the records with a null value in the upload_date field. Upon completion of the import I perform another query (in the same script) to change all null upload_date values in the MySQL table to the current timestamp, thus preventing the records from being uploaded again.

This might seem complicated, or maybe not. But, it is EXTREMELY fast. cool.gif

Posted

That does sound like a decent solution, but I'm now trying out a plug-in made by Productive Computing (Outlook Manipulator) to do the trick instead. Thanks though.

This topic is 7774 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.