SQL.isOpened
------------

Tests whether the specified command object is opened.

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

MBS( "SQL.isOpened"; Command ) 

**MBS**( **"SQL.isOpened";** /\* Tests whether the specified command object is opened. \*/  
**$Command**) /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). | $Command |

### Result

Returns 1 if the command object is opened; otherwise 0.

### Description

Tests whether the specified command object is opened.  
### Examples

Check open status:

 Set Variable \[$r ; Value:MBS ( "SQL.isOpen"; $Connection )\]  
### See also

- [SQL.NewCommand](SQLNewCommand.md)

This function is free to use.

Created 18th August 2014 , last changed 17th May 2016

  
[SQL.isExecuted](SQLisExecuted.md) - [SQL.isResultSet](SQLisResultSet.md)

[HTML Version](SQLisOpened.shtml)