TOLEDBFieldDesc.UDTName not filled in?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Wed 24 Apr 2013 13:17

TOLEDBFieldDesc.UDTName not filled in?

Post by Mithandir » Wed 24 Apr 2013 13:22


I'm trying to get the user defined data type for a field. In the database, the field is declared like this:

[SN_NatNumber] [dbo].[CSRRN] NULL


CREATE TYPE [dbo].[CSRRN] FROM [nvarchar](13) NULL

However, when I do this:
FD : TOLEDbFieldDesc;
FD := TOLEDbFieldDesc(qrySeniors.GetFieldDesc('SN_Natnumber'));

then FD.UDTName is empty (and so are the other UDT* fields).

I've tried this both with NativeClient provider as SQL provider. Database is MS SQL Server 2008R2.

What am I doing wrong?


Re: TOLEDBFieldDesc.UDTName not filled in?

Post by AndreyZ » Wed 24 Apr 2013 15:15

The point is that SQL Server does not return the UDT name for such field. We cannot influence such SQL Server behaviour.

Post Reply