# MsSql To Datatable

Retrieves the data of the named table from the connected MsSql database and holds it in the Collection data type.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `ConnectionSettings` | [`PAWMsSqlConnectionSettings`](/doc/pawmssqlconnectionsettings-sPYSdWCaH8) | ✅Yes     | Connection information |
| `TableName` | `String` | ✅Yes     | Table name  |
| `Filter`  | `String` | ❌No      | WHERE condition |
| `ColumnNames` | `String` | ❌No      | Comma-separated column list |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `IsMsSqlToDatatableSuccessful` | `Boolean` | Returns "**True**" if the operation succeeds, "**False**" if it fails. |
| `MsSqlToDatatableMessage` | `String` | Returns the error information received if the operation fails. |
| `MsSqlToDatatableResult` | `DataTable` | Collection data resulting from the operation. |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Specifies whether an exception is thrown when the operation fails. The default value is "**No**". |