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.

Execute SQL Function Returned Object?

Featured Replies

I think I am missing a fundamental piece.. If I run the following:

Execute SQL [ ODBC Data Source: MySqlDatabase; Calculated SQL Text: "SELECT * FROM Client"] 

And it works, where is the data/object returned?

I am trying to query an external MySql database and check to see if a value exists in a table, and if it does to reurn the uid of that record. But, can seem to get a very simple statment like the above to work?

You could try setting a variable to Get(LastODBCError) after your query. I haven't tried it, but I wonder if that would give you enough info to at least tell if a record exists.

The script step is kind of a weird one -- it lets you manipulate data in the sql database but not query it. Contrast with the ExecuteSQL calculation, which does the inverse.

If it's a supported version of MySql, you can add tables from the MySql database directly to your FileMaker relationship graph and then use a native FileMaker Find, or use the ExecuteSQL calculation to return the results.

The Execute SQL script step is not meant to return data so you can't do SELECT with it; it is for pushing data to the data source.  The "import from ODBC source" is meant to do SELECTs

On the other hand INSERT can use the result of a SELECT (as in any SQL) in the query

http://www.w3schools.com/sql/sql_insert_into_select.asp

But that's all result back into the SQL db from the SQL db and would use the Execute SQL script step. Nothing would be returned to FM except any logs of the transaction if logs are set up in the ODBC DSN (data source name)

Tyra can you provide more details of what you are trying to do?

beverly

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.