Skip 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.

inserting data from a complete found set into mysql

Featured Replies

  • Newbies

i'm new to using the 'execute sql' script step and i'm not very well known with sql statements. what i'm trying to to is insert all data in a found set into a mysql database:

INSERT INTO MysqlTable( CustID) Values (" & "'"& FMPTable::CustomerID & "'")

with this code only the first record is inserted, even though i have 10 records in the found set.

doest this mean i need to loop this script step for every record in the found set? or can this be done by modifiying the sql query.

  • 1 month later...

I can help you with the loop which will keep going until all the records in your found set are processed:

Go to Record/Request/Page [First]

Loop

Execute SQL [No dialog; DSN: wvaadb;

Calculated SQL Text: "UPDATE alumnus SET LastName='" & myFMPDatabase::LastName & "', FirstName = '" & myFMPDatabase::FirstName & "', Address1 = '" & myFMPDatabase::Address1 & "' "

& " WHERE AlumnusID = " & myFMPDatabase::AlumnusID]

Go to Record/Request/Page [Next; Exit after last]

End Loop

However, I have not had success with getting the correct MySQL syntax- can you help me with that? The above would work with a SQL database (Thanks to Jonathan Monroe from Actual Technologies), but does not seem to with MySQL.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.