# List the databases of a ODBC, OLEDB or CUSTOM connection

List the databases of a ODBC, OLEDB or CUSTOM connection by using the [GetDatabases method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-doc-getdatabases.htm) or the [GetDatabasesFromConnectionString method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-global-getdatabasesfromconnectionstring.htm).

## Examples

Example 1:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-databases-Odbc-Oledb-custom-connection.htm)

#### The goal is to list the databases of an ODBC connection at app level.

The handle of the request is 1 because the [GetDatabases method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-doc-getdatabases.htm) applies at app level.

The identifier of the connection is 8CD9E620-29BEFE42-2C8AA843-9A1156C5-3D89B173.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "GetDatabases",
  "handle": 1,
  "params": [
    "8CD9E620-29BEFE42-2C8AA843-9A1156C5-3D89B173"
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "qDatabases": [
      {
        "qName": "AdventureWorks"
      },
      {
        "qName": "AdventureWorksDW"
      },
      {
        "qName": "BetsysBikes"
      },
      {
        "qName": "BigColumn"
      },
      {
        "qName": "CircularReference"
      },
      {
        "qName": "Config_ODBC"
      },
      {
        "qName": "dbgen5Gb"
      },
      {
        "qName": "FanTrap"
      },
      {
        "qName": "large_data"
      },
      {
        "qName": "LinkedTablesData",
        "qIsDefault": true
      },
      {
        "qName": "Many_Tables"
      },
      {
        "qName": "master"
      },
      {
        "qName": "mellan slag"
      },
      {
        "qName": "msdb"
      },
      {
        "qName": "New_Test"
      },
      {
        "qName": "Northwind"
      },
      {
        "qName": "pen"
      },
      {
        "qName": "Population"
      },
      {
        "qName": "QVPR_Raleigh_HOD"
      },
      {
        "qName": "sandbox"
      },
      {
        "qName": "SongsAndAlbums"
      },
      {
        "qName": "SynKey"
      },
      {
        "qName": "tempdb"
      },
      {
        "qName": "Test"
      },
      {
        "qName": "Tweets"
      }
    ]
  }
}
```

The list of the databases is displayed.

Example 2:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-databases-Odbc-Oledb-custom-connection.htm)

#### The goal is to list the databases of an ODBC connection at global level.

The handle of the request is -1 because the [GetDatabasesFromConnectionString method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-global-getdatabasesfromconnectionstring.htm) applies at global level.

* The name of the connection is qasql\_intetest\_QV and the type ODBC.
* The connection string is ODBC CONNECT TO qasql\_intetest.
* The user name and the password of the connection are given.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "GetDatabasesFromConnectionString",
  "handle": -1,
  "params": [
    {
      "qName": "qasql_intetest_QV",
      "qMeta": {},
      "qConnectionString": "ODBC CONNECT TO qasql_intetest",
      "qUserName": "Qlik",
      "qPassword": "QlikPassword",
      "qType": "ODBC"
    }
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 6,
  "result": {
    "qDatabases": [
      {
        "qName": "_Database"
      },
      {
        "qName": "AdventureWorks"
      },
      {
        "qName": "AdventureWorksDW"
      },
      {
        "qName": "Data_base"
      },
      {
        "qName": "master"
      },
      {
        "qName": "msdb"
      },
      {
        "qName": "Qtest_pla"
      },
      {
        "qName": "QVPR-NHG"
      },
      {
        "qName": "QVPR-test"
      },
      {
        "qName": "Software Manager Database"
      },
      {
        "qName": "tempdb"
      },
      {
        "qName": "Wise Services Database"
      }
    ]
  }
}
```

The list of the databases is displayed.