Hi,
I want to get the fieldnames and datatypes from a table using the TUniMetaData component.
The datatypes are apparently stored as an integer.
Where can I see what the integervalue corresponds to?
I have for example got datatypes 7, 8 and 27 in a specific table..
Is there some built-in way to get the names in stead?
For example:
Smallint, Integer, double..
Thanks for your help
Regards
Jens Fudge
Using TUniMetadata to get field names and types
For which I will eagerly await.
In the meantime, do you have any documentation of which datatypes get which numbers?
Do they differ depending on the provider?
I know that 27 for interbase is double
But I would like it if you could point me to a map or something, I can easily implement a map with a TDictionary or something..
But I don't know the values.
/Jens
In the meantime, do you have any documentation of which datatypes get which numbers?
Do they differ depending on the provider?
I know that 27 for interbase is double

But I don't know the values.
/Jens
Unfortunately the meaning of the DATA_TYPE field differs depending on the provider. In the Oracle provider there are already string data type names.
For the InterBase provider you can get corresponding data type names using the following query:
For the InterBase provider you can get corresponding data type names using the following query:
Code: Select all
SELECT * FROM RDB$TYPES
WHERE RDB$FIELD_NAME = 'RDB$FIELD_TYPE'