FM.SQL.ToMatrix
---------------

Copies from result set to a Matrix.

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

MBS( "FM.SQL.ToMatrix"; SQLref ) 

**MBS**( **"FM.SQL.ToMatrix";** /\* Copies from result set to a Matrix. \*/  
**$SQLref**) /\* The reference number returned by [FM.SQL.Execute](FMSQLExecute.md) function. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SQLref | The reference number returned by [FM.SQL.Execute](FMSQLExecute.md) function. | $SQLRef |

### Result

Returns matrix reference number or error.

### Description

Copies from result set to a Matrix.  
Allows you to do a [FM.SQL.Execute](FMSQLExecute.md), work with the result set, convert to matrix and then use [matrix](component_Matrix.md) functions.  
### See also

- [FM.SQL.Execute](FMSQLExecute.md)
- [Matrix.ConvertDataType](MatrixConvertDataType.md)
- [SQL.Execute](SQLExecute.md)

### Release notes

- **Version 14.0**
    - Added [FM.SQL.ToMatrix](https://www.mbsplugins.eu/FMSQLToMatrix.shtml) function.

### Blog Entries

- [MBS FileMaker Advent calendar - Door 4 - FM.SQL.Executeand life in the matrix](https://www.mbsplugins.de/archive/2025-12-04/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 14.0](https://www.mbsplugins.de/archive/2024-01-23/New_in_MBS_FileMaker_Plugin_14/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 14.0 für Claris FileMaker](https://www.mbsplugins.de/archive/2024-01-16/Neues_MBS_Plugin_140_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 14.0 for Claris FileMaker](https://www.mbsplugins.de/archive/2024-01-16/MBS_FileMaker_Plugin_140_for_C/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.6pr1](https://www.mbsplugins.de/archive/2023-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Data structures in MBS Plugin](https://www.mbsplugins.de/archive/2023-11-27/Data_structures_in_MBS_Plugin/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 24th November 2023 , last changed 29th September 2025

  
[FM.SQL.Text](FMSQLText.md) - [FM.SQL.XMLRecord](FMSQLXMLRecord.md)

[HTML Version](FMSQLToMatrix.shtml)