Page 1 of 1

Get field type

Posted: Sun 22 May 2011 21:21
by maciejmt
Hi,

I'd like to get column type in TMyQuery object.

Code: Select all

if MyQuery1.Fields[0].AsVariant = vtInteger then
Does exist other way ?

Posted: Mon 23 May 2011 10:59
by AndreyZ
Hello,

You should use the following code:

Code: Select all

if MyQuery1.Fields[0].DataType = ftInteger then