SQL.Disconnect
--------------

Disconnects the connection from the database.

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

MBS( "SQL.Disconnect"; Connection ) 

**MBS**( **"SQL.Disconnect";** /\* Disconnects the connection from the database. \*/  
**$Connection**) /\* The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Connection | The connection reference number gained with [SQL.NewConnection](SQLNewConnection.md). | $Connection |

### Result

Returns "OK" or error message.

### Description

Disconnects the connection from the database.   
### See also

- [SQL.FreeConnection](SQLFreeConnection.md)
- [SQL.isConnected](SQLisConnected.md)
- [SQL.NewConnection](SQLNewConnection.md)
- [SSH.Disconnect](SSHDisconnect.md)
- [TAPI.Disconnect](TAPIDisconnect.md)

### Example Databases

- [Third Party/FileMaker Snippet Storage](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Third%20Party/FileMaker%20Snippet%20Storage.shtml#33CustomFunctionAnchor_)

This function is free to use.

Created 18th August 2014 , last changed 18th August 2014

  
[SQL.ConvertDateTimeToSQL](SQLConvertDateTimeToSQL.md) - [SQL.Execute](SQLExecute.md)

[HTML Version](SQLDisconnect.shtml)