FM.SetSQLBatchMode
------------------

Sets turbo level for sending SQL in chunks.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) [FMSQL](component_FMSQL.md) | [6.4](newinversion64.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "FM.SetSQLBatchMode"; Value ) 

**MBS**( **"FM.SetSQLBatchMode";** /\* Sets turbo level for sending SQL in chunks. \*/  
**$Value**) /\* The chunk size.  
Default is 1, but 10 or 50 is usually faster.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The chunk size.   Default is 1, but 10 or 50 is usually faster. | 1 |

### Result

Returns OK or error.

### Description

Sets turbo level for sending SQL in chunks.  
For use in [FM.InsertRecordQuery](FMInsertRecordQuery.md).  
(others could be added)  
  
Our plugin can send several SQL commands in one chunk which makes some operation much faster.  
Instead of doing one record at a time with insert and commit, we can e.g. do 50 inserts and then one commit.  
### Examples

Move records, 50 inserts per chunk:

 Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.Reset](ProgressDialogReset.md)") \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.SetTitle](ProgressDialogSetTitle.md)"; "Please wait." ) \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.SetTopText](ProgressDialogSetTopText.md)"; "Copying records..." ) \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.Show](ProgressDialogShow.md)" ) \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.SetProgress](ProgressDialogSetProgress.md)"; 0 ) \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.Update](ProgressDialogUpdate.md)" ) \]   
  
Set Variable \[ $r ; Value: MBS ( "FM.SetSQLBatchMode"; 50) \]   
Set Variable \[ $r ; Value: MBS ( "[FM.InsertSetUpdateProgressDialog](FMInsertSetUpdateProgressDialog.md)"; 1) \]   
Set Variable \[ $r ; Value: MBS ( "[FM.InsertRecordQuery](FMInsertRecordQuery.md)"; ""; "dest"; $FieldNames ; ""; "SELECT \\"f1\\", \\"f2\\", \\"f3\\", \\"f4\\", \\"f5\\", \\"f6\\", \\"f7\\",… \]   
Set Variable \[ $r ; Value: MBS ( "[ProgressDialog.Hide](ProgressDialogHide.md)") \]  
### See also

- [Dialog.SetTop](DialogSetTop.md)
- [FM.GetSQLBatchMode](FMGetSQLBatchMode.md)
- [FM.InsertRecord](FMInsertRecord.md)
- [FM.InsertRecordQuery](FMInsertRecordQuery.md)
- [ProgressDialog.Hide](ProgressDialogHide.md)
- [ProgressDialog.Reset](ProgressDialogReset.md)
- [ProgressDialog.SetProgress](ProgressDialogSetProgress.md)
- [ProgressDialog.SetTopText](ProgressDialogSetTopText.md)
- [ProgressDialog.Show](ProgressDialogShow.md)
- [ProgressDialog.Update](ProgressDialogUpdate.md)

### Release notes

- **Version 16.1**
    - Deprecated [FM.GetSQLBatchMode](https://www.mbsplugins.eu/FMGetSQLBatchMode.shtml) and [FM.SetSQLBatchMode](https://www.mbsplugins.eu/FMSetSQLBatchMode.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 16.1pr1](https://www.mbsplugins.de/archive/2026-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.4pr8](https://www.mbsplugins.de/archive/2016-09-19/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 17th September 2016 , last changed 21st January 2026

  
[FM.SetDisableContextualMenus](FMSetDisableContextualMenus.md) - [FM.SetThreadName](FMSetThreadName.md)

[HTML Version](FMSetSQLBatchMode.shtml)