# List the values of a table for a ODBC, OLEDB or CUSTOM connection

List the values of a table for a ODBC, OLEDB or CUSTOM connection by using the [GetDatabaseTablePreview method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-doc-getdatabasetablepreview.htm).

## Example

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

#### The goal is to list the values of a table for a ODBC connection.

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

The identifier of the connection is 58F56A5C-6DE23A73-AB24CCCF-2C3AC397-59AE8B4E.

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": 9,
  "method": "GetDatabaseTablePreview",
  "handle": 1,
  "params": [
    "58F56A5C-6DE23A73-AB24CCCF-2C3AC397-59AE8B4E",
    "AdventureWorks",
    "HumanResources",
    "Department"
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 9,
  "result": {
    "qPreview": [
      {
        "qValues": [
          "DepartmentID",
          "Name",
          "GroupName",
          "ModifiedDate"
        ]
      },
      {
        "qValues": [
          "1",
          "Engineering",
          "Research and Development",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "2",
          "Tool Design",
          "Research and Development",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "3",
          "Sales",
          "Sales and Marketing",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "4",
          "Marketing",
          "Sales and Marketing",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "5",
          "Purchasing",
          "Inventory Management",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "6",
          "Research and Development",
          "Research and Development",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "7",
          "Production",
          "Manufacturing",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "8",
          "Production Control",
          "Manufacturing",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "9",
          "Human Resources",
          "Executive General and Administration",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "10",
          "Finance",
          "Executive General and Administration",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "11",
          "Information Services",
          "Executive General and Administration",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "12",
          "Document Control",
          "Quality Assurance",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "13",
          "Quality Assurance",
          "Quality Assurance",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "14",
          "Facilities and Maintenance",
          "Executive General and Administration",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "15",
          "Shipping and Receiving",
          "Inventory Management",
          "1998-06-01 00:00:00"
        ]
      },
      {
        "qValues": [
          "16",
          "Executive",
          "Executive General and Administration",
          "1998-06-01 00:00:00"
        ]
      }
    ]
  }
}
```

The values in the table Department are displayed in qPreview . Note that the first object in qPreview returns the names of the fields in the table.