# Check if a connection string is valid

Check if a connection string is valid by using the [IsValidConnectionString method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-global-isvalidconnectionstring.htm).

Example:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ConnectToDataSources/check-connection-string-is-valid.htm)

#### The goal is to check that a connection string for a ODBC connection is valid.

The name of the connection is qasql\_intetest\_QV and the type of the connection is ODBC.

The connection string is ODBC CONNECT TO qasql\_intetest.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "IsValidConnectionString",
  "handle": -1,
  "params": [
    {
      "qName": "qasql_intetest_QV",
      "qMeta": {},
      "qConnectionString": "ODBC CONNECT TO qasql_intetest",
      "qUserName": "intetest",
      "qPassword": "!qwertyA",
      "qType": "ODBC"
    }
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "qReturn": true
  }
}
```

The connection string is valid.