Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Inserts records in FileMaker database from records in memory.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FM FMSQL | 6.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
SQLref | The reference number returned by FM.SQL.Execute function. | $SQLRef | |
InsertFileName | The file name of where the insert table is inside. Can be empty to look for the table in all files. | Get(FileName) | |
InsertTableName | The name of the table to insert record into. | "Assets" | |
FieldNames | A list of field names for the insert. Empty entries in the list are ignored. |
"Model" | |
StartRow | The index of the start row in the current recordset. First row is 0. |
0 | Optional |
EndRow | The index of the end row in the current recordset. First row is 0. Last Row would be FM.SQL.RowCount-1. |
0 | Optional |
Returns OK or error.
Copy records:
# select some data
Set Variable [$Records; Value:MBS( "FM.SQL.Execute"; ""; "SELECT FirstName, LastName, Birthday FROM test" )]
# now insert them somewhere else
Set Variable [$r; Value:MBS( "FM.SQL.InsertRecords"; $Records; ""; "test"; "FirstName¶LastName¶BirthDay")]
# and free record set
Set Variable [$r; Value:MBS( "FM.SQL.Release"; $Records)]
This function checks for a license.
Created 1st August 2016, last changed 15th October 2021