SQL.GetFieldAsJPEG
------------------

Returns field's value as JPEG value.

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

MBS( "SQL.GetFieldAsJPEG"; Command; Field ) 

**MBS**( **"SQL.GetFieldAsJPEG";** /\* Returns field's value as JPEG value. \*/  
**$Command**; /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/   
**$Field**) /\* The name or one based index of the field. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). | $Command |
| Field | The name or one based index of the field. | $Field |

### Result

Returns container value or error message.

### Description

Returns field's value as JPEG value.  
Field must be a BLOB field. The plugin does not verify if the BLOB contains a valid JPEG image.  
See also [SQL.GetFieldAsPDF](SQLGetFieldAsPDF.md) and [SQL.GetFieldAsPNG](SQLGetFieldAsPNG.md).  
### Examples

Read field value of field "JPEGData" into variable:

 $firstname = MBS ("SQL.GetFieldAsJPEG"; $command ; "JPEGData")  
### See also

- [SQL.GetFieldAsDate](SQLGetFieldAsDate.md)
- [SQL.GetFieldAsFloat](SQLGetFieldAsFloat.md)
- [SQL.GetFieldAsPDF](SQLGetFieldAsPDF.md)
- [SQL.GetFieldAsPNG](SQLGetFieldAsPNG.md)
- [SQL.GetFieldAsText](SQLGetFieldAsText.md)
- [SQL.GetFieldAsTime](SQLGetFieldAsTime.md)
- [SQL.GetFieldIsNull](SQLGetFieldIsNull.md)
- [SQL.GetFieldsAsJSON](SQLGetFieldsAsJSON.md)
- [SQL.GetParamAsJPEG](SQLGetParamAsJPEG.md)
- [SQL.NewCommand](SQLNewCommand.md)

### Example Databases

- [SQL to other databases/SQLite blob](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SQL%20to%20other%20databases/SQLite%20blob.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 3.0pr3](https://www.mbsplugins.de/archive/2012-10-19/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 13th January 2015

  
[SQL.GetFieldAsFloat](SQLGetFieldAsFloat.md) - [SQL.GetFieldAsNumber](SQLGetFieldAsNumber.md)

[HTML Version](SQLGetFieldAsJPEG.shtml)