Page 1 of 1

TOLEDBFieldDesc.UDTName not filled in?

Posted: Wed 24 Apr 2013 13:22
by Mithandir
Hey,

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

Where:

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?

Posted: Wed 24 Apr 2013 15:15
by AndreyZ
The point is that SQL Server does not return the UDT name for such field. We cannot influence such SQL Server behaviour.