How to distinguish VARCHAR2 vs NVARCHAR2

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

How to distinguish VARCHAR2 vs NVARCHAR2

Post by jdorlon » Wed 30 Jul 2008 14:37

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 31 Jul 2008 08:16

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

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Post by jdorlon » Thu 31 Jul 2008 14:34

Thank you, it works.

Post Reply