# DataConnections.register Method

> DataConnections.register method in the TX Sheet Control JavaScript API for Node.js: Registers a transport. Includes the syntax and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > DataConnections > DataConnections.register Method
- **493 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/register-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/register-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/register-method/llms-full.txt

---

Registers a transport; replacing it cancels requests using the previous transport.

Owner: [DataConnections](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```javascript
owner.register(connectionId, provider)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `connectionId` | `string` | No | Value matching connectionId's declared type and the owning object's validation rules. |
| `provider` | `DataProvider` | No | Value matching provider's declared type and the owning object's validation rules. |

### Return Value

`void`.

### Examples

Pass an existing DataConnections from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.

```javascript
function applyDataConnectionsRegister(dataConnections) {
    dataConnections['register']('sales-service', (request, signal) =>
        Promise.resolve({
            columns: ['Region', 'Revenue'],
            rows: [
                ['North', 42000],
                ['South', 38500],
            ],
        }),
    );
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [DataConnections Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)
- [DataProvider Type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dataprovider/llms-full.txt)

---

## Nearby

- **Previous:** [DataConnections.refreshAll Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/refreshall-method/llms-full.txt)
- **Next:** [DataConnections.start Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/dataconnections/start-method/llms-full.txt)
