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.
Example
The handle of the request is 1 because the GetDatabaseTablePreview method 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.