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.

Executing SQL Command via ODBC takes a LONG time

Featured Replies

Hey, all.

I have a very simple SQL statement that is only doing a SELECT on one field (and it's an indexed field, too) with no WHERE clause. When I get to this part of a Windows Scripting Host script:

iAffect = 0

msgbox "cmd.Execute(iAffect)"

set rs = cmd.Execute(iAffect)

The command takes about 20-30 min. to return. The .fp5 (under FM Pro 6) that I'm querying is about 7800 records.

Does anyone have any ideas as to why FM would take half an hour to just process that query before I even got to walk through the recordset?

Try using MSQUERY instead.

  • Author

I've never used MSQuery. Is that something used within, say, an Office application?

I have to run these queries outside of FM and via scripts as they are part of our interface to the database that runs every 15 minutes to pull updated data.

FWIW, I've done with two other sites using Filemaker and it's worked fine. Not sure why this site's database is so slow. Is there some setting in Filemaker perhaps?

Yes. Word 2003 | View | Toolbars | Database | Insert Database | Get Data | Tools | MS Query | your SQL code

  • Author

That doesn't do me any good then. This must run via command-line as a .WSF or .VBS file.

What gets me is why does this FM database behave so differently from others I've dealt with in the past in the same manner?

MSQUERY.EXE could be put in a script.

  • Author

Well, I have Office 2000 installed and didn't find an MSQuery.exe on my harddrive. Is there some way to download it from MSFT?

The file name has been changed to msqry32.exe. It's in office2003office11.

  • Author

Still has the same problem of taking FOREVER to return anything.

I'm examining other options with the developer including him writing data to a temp table that contains just those fields that I need.

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.