SQL.GetParamAsContainer
-----------------------

Queries parameter value as container.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SQL](component_SQL.md) | [6.2](newinversion62.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "SQL.GetParamAsContainer"; Command; Param; FileName ) 

**MBS**( **"SQL.GetParamAsContainer";** /\* Queries parameter value as container. \*/  
**$Command**; /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/   
**$Param**; /\* The parameter name or ID. Pass number for ID, a text with parameter name or the index with # prefix. e.g. "#0" for first parameter.e.g. "1" \*/   
**$FileName**) /\* The filename for the container.  
This will determinate the type of data to FileMaker.e.g. "test.jpg" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). | $Command |
| Param | The parameter name or ID. Pass number for ID, a text with parameter name or the index with # prefix. e.g. "#0" for first parameter. | "1" |
| FileName | The filename for the container.   This will determinate the type of data to FileMaker. | "test.jpg" |

### Result

Returns container value or error.

### Description

Queries parameter value as container.  
If you can provide a file name, we can use it to auto detect the type of data and import it in the right format, e.g. add a preview for PDF or the image size for JPEG.  
### Examples

Query image param value:

 MBS ( "SQL.GetParamAsContainer"; $Command ; "MyBlob"; $FileName )  
### See also

- [SQL.GetFieldAsContainer](SQLGetFieldAsContainer.md)
- [SQL.NewCommand](SQLNewCommand.md)
- [SQL.SetParamAsContainer](SQLSetParamAsContainer.md)

### Blog Entries

- [MBS FileMaker Plugin, version 6.2pr10](https://www.mbsplugins.de/archive/2016-05-20/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 17th May 2016 , last changed 17th May 2016

  
[SQL.GetParamAsBoolean](SQLGetParamAsBoolean.md) - [SQL.GetParamAsDate](SQLGetParamAsDate.md)

[HTML Version](SQLGetParamAsContainer.shtml)