SQL.GetConnectionOption
-----------------------

Gets a string value of a specific connection option.

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

MBS( "SQL.GetConnectionOption"; Connection; Key ) 

**MBS**( **"SQL.GetConnectionOption";** /\* Gets a string value of a specific connection option. \*/  
**$Connection**; /\* The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). \*/   
**$Key**) /\* A string key of the connection or command option.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Connection | The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). | $Connection |
| Key | A string key of the connection or command option. | "" |

### Result

Returns the value or error message.

### Description

Gets a string value of a specific connection option.  
Call this method to get value(s) of server specific connection or command options. See Server specific notes. If an option is not specified in connection objects, the Library takes the default option value.  
  
see also:  
[https://www.sqlapi.com/ApiDoc/class\_s\_a\_connection.html](https://www.sqlapi.com/ApiDoc/class_s_a_connection.html)  
### See also

- [SQL.GetCommandOption](SQLGetCommandOption.md)
- [SQL.GetConnectionOptions](SQLGetConnectionOptions.md)
- [SQL.NewConnection](SQLNewConnection.md)
- [SQL.SetConnectionOption](SQLSetConnectionOption.md)

### Release notes

- **Version 8.4**
    - Added [SQL.GetCommandOptions](http://www.mbsplugins.eu/SQLGetCommandOptions.shtml), [SQL.GetConnectionOptions](http://www.mbsplugins.eu/SQLGetConnectionOptions.shtml), [SQL.GetFieldOptions](http://www.mbsplugins.eu/SQLGetFieldOptions.shtml) and [SQL.GetParamOptions](http://www.mbsplugins.eu/SQLGetParamOptions.shtml) functions to query options list.

This function is free to use.

Created 18th August 2014 , last changed 10th January 2020

  
[SQL.GetCommandTag](SQLGetCommandTag.md) - [SQL.GetConnectionOptions](SQLGetConnectionOptions.md)

[HTML Version](SQLGetConnectionOption.shtml)