# List the fields in a table for a ODBC, OLEDB or CUSTOM connection

List the fields in a table for a ODBC, OLEDB or CUSTOM connection by using the [GetDatabaseTableFields method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-doc-getdatabasetablefields.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-fields-in-table-for-ODBC.htm)

#### The goal is to list the fields in a table for a ODBC connection.

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

The identifier of the connection is C6B69168-9C3CDDFA-9E6DE0F2-72CB57FD-59720244.

The name of the database is AdventureWorks , the name of the owner is HumanResources and the name of the table is Department.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 8,
  "method": "GetDatabaseTableFields",
  "handle": 1,
  "params": [
    "C6B69168-9C3CDDFA-9E6DE0F2-72CB57FD-59720244",
    "AdventureWorks",
    "HumanResources",
    "Department"
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 8,
  "result": {
    "qFields": [
      {
        "qName": "DepartmentID",
        "qIsKey": true
      },
      {
        "qName": "Name"
      },
      {
        "qName": "GroupName"
      },
      {
        "qName": "ModifiedDate"
      }
    ]
  }
}
```

The list of the fields in the table Department is displayed. The field DepartmentID is a primary key.