# GetConnectionAsync Method

## Overloads

| [GetConnectionAsync(String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm#Qlik_Engine_IApp_GetConnectionAsync_System_String_) |  | Retrieves a connection and returns:<br><br>\* The creation time of the connection.<br><br>\* The identifier of the connection.<br><br>\* The type of the connection.<br><br>\* The name of the connection.<br><br>\* The connection string. |
| --- | --- | --- |
| [GetConnectionAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm#Qlik_Engine_IApp_GetConnectionAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Retrieves a connection and returns:<br><br>\* The creation time of the connection.<br><br>\* The identifier of the connection.<br><br>\* The type of the connection.<br><br>\* The name of the connection.<br><br>\* The connection string. |
| [GetConnectionAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm#Qlik_Engine_IApp_GetConnectionAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_) |  | Retrieves a connection and returns:<br><br>\* The creation time of the connection.<br><br>\* The identifier of the connection.<br><br>\* The type of the connection.<br><br>\* The name of the connection.<br><br>\* The connection string. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm)

## GetConnectionAsync(String)

Retrieves a connection and returns:

* The creation time of the connection.
* The identifier of the connection.
* The type of the connection.
* The name of the connection.
* The connection string.

### Declaration

```

          Task<Connection> GetConnectionAsync([QixName("qConnectionId")] string connectionId)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | connectionId | Identifier of the connection. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;[Connection](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Connection.htm)&gt; |  |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm)

## GetConnectionAsync(AsyncHandle, String)

Retrieves a connection and returns:

* The creation time of the connection.
* The identifier of the connection.
* The type of the connection.
* The name of the connection.
* The connection string.

### Declaration

```

          Task<Connection> GetConnectionAsync(AsyncHandle asyncHandle, [QixName("qConnectionId")] string connectionId)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | connectionId | Identifier of the connection. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;[Connection](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Connection.htm)&gt; |  |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetConnectionAsync.htm)

## GetConnectionAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;, String)

Retrieves a connection and returns:

* The creation time of the connection.
* The identifier of the connection.
* The type of the connection.
* The name of the connection.
* The connection string.

### Declaration

```
Task<T> GetConnectionAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qConnectionId")] string connectionId)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | connectionId | Identifier of the connection. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |