JoniS Posted February 28, 2008 Posted February 28, 2008 I am attempting to import all records from an external SQL database's table and put them in a FileMaker table. The "Import Records" script only worked the first time I ran it. I only had 4 records in the SQL table at the time. Then I added in 5 more records to the SQL table, deleted all the records out of the FileMaker table so as to make it a clean slate, and reran the Import Records script, and it only imports the first 4 records from the SQL table again instead of all 9. I'm at a loss for what could be causing such shenanigans. Any help would be greatly appreciated!
mr_vodka Posted February 28, 2008 Posted February 28, 2008 Check your import script options. Under the import action area, do you have it set on Add new records, update existing records, or update matching records?
JoniS Posted February 28, 2008 Author Posted February 28, 2008 John, I've tried all three ways. If I set the option to "Add New Records," my FileMaker table keeps getting the first 4 records added over and over again (4, 8, 12, 16 records). And it never adds all 9 original records from the SQL table from which I'm importing. Just duplicating the first 4. If I set the option to "Update existing records in found set" and check the "add remaining data as new records," remove all the records from the table and retry the import, I get the first 4 records. Every subsequent run, there are still only 4 records. If I set the option to "Update Matching records in found set" and check the "add remaining data as new records," I get the same result as "Update existing." I'm stumped.
mr_vodka Posted February 29, 2008 Posted February 29, 2008 Something doesnt sound right. Are you sure that you are pointing to the correct table or view?
LaRetta Posted February 29, 2008 Posted February 29, 2008 I'm a bit confused. This is an OBDC import? What query are you using? I think there is something we don't know here. :idunno:
JoniS Posted February 29, 2008 Author Posted February 29, 2008 Thank you, that helped. I'm getting closer to the issue, but it still isn't resolved. I was indeed connecting to the wrong odbc datasource because I had one set up on my local machine named the same as the one set up on the FileMaker Server 9 (and that one had the old data in it), so I deleted the odbc on my local machine. I have the correct odbc set up in the file's "Manage External Data Sources" which is on the FileMaker Server, but the odbcs that are set up on the FileMaker Server don't show up as an option when I make the "Import Records" script -- only my local machine's odbcs. Is there something else I'm missing? There has to be a way to run a script by using a data source on the FileMaker Server, right?
JoniS Posted February 29, 2008 Author Posted February 29, 2008 Bwa ha ha! I found a work around. I added the SQL table from my correct odbc datasource (located on the FileMaker Server) to the relationship table graph under "Manage Database." Then in the "Import Records" script, when I "specified data source," I selected "file" instead of "odbc." I then selected the file in which I was working and used the SQL table as the source for importing records to my target FileMaker table. I reran the script, and, voila! My FileMaker table had the 9 records it should. Finally. Thank you for all your help, John, LaRetta. I really appreciate it. And if this doesn't make sense as a solution either, please let me know if there's a better way. For now, it works.
Recommended Posts
This topic is 6113 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