Page 1 of 1

TUniMetaData and Sql Server Datatypes

Posted: Fri 01 Aug 2014 14:15
by martin.trummer
the TUniMetaData component returns a numeric value for the DATA_TYPE field:
e.g.

Code: Select all

DataType := FUniMetaData.FieldByName('DATA_TYPE').AsString; 
// returns 5 for a float field
how can I get the data-type as string - i.e. 'float' instead of 5?

Re: TUniMetaData and Sql Server Datatypes

Posted: Mon 04 Aug 2014 12:26
by martin.trummer
this seems to be some kind of ole-db data type

instead of TUniMetaData, it's easier for me to use a simple query that returns the native data-types:

Code: Select all

SELECT TABLE_NAME, COLUMN_NAME , ordinal_position as POSITION,
DATA_TYPE ,
numeric_precision as DATA_PRECISION ,
numeric_scale as DATA_SCALE ,
is_nullable as NULLABLE
FROM INFORMATION_SCHEMA . COLUMNS
where table_catalog = 'ds'
and table_schema= 'dbo'
order by TABLE_NAME , ORDINAL_POSITION

Re: TUniMetaData and Sql Server Datatypes

Posted: Tue 05 Aug 2014 07:53
by azyk
At present UniDAC does not support this functionality. You can suggest this feature at our UserVoice http://devart.uservoice.com/forums/1046 ... 939-unidac . If the suggestion gets a lot of votes, we will consider the possibility to implement it.