Unanswered: How to access table metadata in Pervasive
I'm new to Pervasive. Currently I'm looking for the following solution but did not succeed.
I want to read the metadata of a given table i.e., column names, datatypes, and their sizes/widths.
I understand I can do this by using the following query:
select * from X$Field where Xe$File = file_id
This gives me two problems:
1. The number of rows returnd by the above query and the number of columns returned by the query "Select * from file_id" do not match. There seems to be some additional columns in the result returned by the first query.
This problem is not so significant, I can directly use the column information from the resultset metadata of the second query.
2. Second problem is, the first query, i.e. "select * from X$Field where Xe$File = file_id" contains a field with name "Xe$DataType" but it's a number (UTINYINT, to be precise). So how can I find out the "Name" of the datatype (example: "varchar") ?