The TBQUERY service returns information about a specified table,
which must have been opened (TBOPEN) by the current user before
invoking this service. This information can be obtained:
- The number of key fields and their names
- The number of all other columns and their names
- The number of rows and the current row position
- The sort arguments in the last invocation of TBSORT
- Details of the last invocation of TBSARG
All the parameters except for table-name are optional. If all of
the optional parameters are omitted, TBQUERY simply validates the
existence of an open table.