SQL.SetIsolationLevel
---------------------

Sets the transaction isolation level.

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

MBS( "SQL.SetIsolationLevel"; Connection; IsolationLevel ) 

**MBS**( **"SQL.SetIsolationLevel";** /\* Sets the transaction isolation level. \*/  
**$Connection**; /\* The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). \*/   
**$IsolationLevel**) /\* The new isolation level. One of the following strings: ReadUncommitted, ReadCommitted, RepeatableRead or Serializable.e.g. "ReadUncommitted" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Connection | The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). | $Connection |
| IsolationLevel | The new isolation level. One of the following strings: ReadUncommitted, ReadCommitted, RepeatableRead or Serializable. | "ReadUncommitted" |

### Result

Returns "OK" or error message.

### Description

Sets the transaction isolation level.  
  
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.GetIsolationLevel](SQLGetIsolationLevel.md)
- [SQL.NewConnection](SQLNewConnection.md)

This function is free to use.

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

  
[SQL.SetFieldOption](SQLSetFieldOption.md) - [SQL.SetParamAsBoolean](SQLSetParamAsBoolean.md)

[HTML Version](SQLSetIsolationLevel.shtml)