If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > How to access table metadata in Pervasive

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-14-03, 02:25
praveenprabhu praveenprabhu is offline
Registered User
 
Join Date: Mar 2003
Posts: 3
Question How to access table metadata in Pervasive

Hi,

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") ?

Thanx in advance

Praveen
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On