Extracting values for enum type

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jcanepa
Posts: 6
Joined: Mon 09 Nov 2009 20:45

Extracting values for enum type

Post by jcanepa » Thu 12 Nov 2009 14:03

How can I extract the values for an enumerated type?

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

Post by Plash » Fri 13 Nov 2009 10:59

You need to write a code that will split a string value returned from a field.

jcanepa
Posts: 6
Joined: Mon 09 Nov 2009 20:45

How do I get values from an enum type?

Post by jcanepa » Fri 13 Nov 2009 17:17

OK, but how do I get the individual values in the first place?

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

Post by Plash » Mon 16 Nov 2009 09:19

Use the AsString property of TField to get a value. For example:

Code: Select all

v := PgQuery.FieldByName('a').AsString;

Post Reply