TUniMetaData and Sql Server Datatypes

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
martin.trummer
Posts: 19
Joined: Mon 12 May 2014 14:16

TUniMetaData and Sql Server Datatypes

Post by martin.trummer » Fri 01 Aug 2014 14:15

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?

martin.trummer
Posts: 19
Joined: Mon 12 May 2014 14:16

Re: TUniMetaData and Sql Server Datatypes

Post by martin.trummer » Mon 04 Aug 2014 12:26

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TUniMetaData and Sql Server Datatypes

Post by azyk » Tue 05 Aug 2014 07:53

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.

Post Reply