Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Import Records SQL execution - strange error

Featured Replies

  • Newbies

Hi!

I have a strange problem when executing a SQL query on SQL Server by running the Import Records function with ODBC. When running the "Import Records" function the sql query runs five times on the SQL server.

Setup:

FileMaker PRO versions: 6.0v4, 5.5v1

Database: SQL Server 2000 on Windows 2000

ODBC: SQL Driver, FileMaker SQL Server Driver

Problem:

This is a simple FMP-script that creates the problem: Import Records [Restore,"DSN: TestDSN", "select * from t_ISBNLog"]

When the FMP script runs once the code "select * from t_ISBNLog" is executed five times on the SQL Server, data from the last of the five queries is returned to FMP.

This occurs only when running "Import Records", not with the "Execute SQL" command.

This is an extract from a trace with SQL Server Profiler:

---

Audit Login -- network protocol: TCP/IP

set quoted_identifier on

set implicit_transactions off

set cursor_close_on_commit off

set ansi_warnings on

set ansi_padding on

set ansi_nulls on

set concat_null_yields_null on

set language us_english

set dateformat mdy

set datefirst 7

sa 1356 62 2004-02-19 11:43:01.483

SQL:BatchCompleted select * from t_ISBNLog sa 0 12 0 0 1356 62 2004-02-19 11:43:01.483

SQL:BatchCompleted select * from t_ISBNLog sa 0 12 0 0 1356 62 2004-02-19 11:43:01.483

SQL:BatchCompleted select * from t_ISBNLog sa 0 12 0 0 1356 62 2004-02-19 11:43:01.483

SQL:BatchCompleted select * from t_ISBNLog sa 0 12 0 0 1356 62 2004-02-19 11:43:01.483

SQL:BatchCompleted select * from t_ISBNLog sa 0 12 0 0 1356 62 2004-02-19 11:43:02.373

Audit Logout sa 445000 70 0 890 1356 62 2004-02-19 11:43:01.483

---

Can somebody confirm this problem? Is this a bug? Any ideas how to solve this problem?

Kind regards,

Niklas Engdahl, Sweden

it might sounds rediculous but did u check to see that:

FM user has rights to IMport and also that ODBC driver+DSN are configured right on SQL side? user/pass

try using a FULL SQL starement and dont select ALL the tables as some field desfinitions will not "translate" eg. repeating fields...etc.

also double check your "field1->field1" that are matched in data types....

All the best!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.