Page 1 of 1

How to distinguish VARCHAR2 vs NVARCHAR2

Posted: Wed 30 Jul 2008 14:37
by jdorlon
Hello,

When I run a query in a TSmartQuery, how can I tell if a ftString field is VARCHAR2 or NVARCHAR2? Is this possible? Querying dba_tab_columns is not an option for me.

Thanks.

-John

Posted: Thu 31 Jul 2008 08:16
by Plash
You can check the SubDataType property of TOraFieldDesc. It equals to dtNString (or dtNWideString when UseUnicode = True) for NVARCHAR2 fields.

Code: Select all

SmartQuery.GetFieldDesc('FIELD1').SubDataType

Posted: Thu 31 Jul 2008 14:34
by jdorlon
Thank you, it works.