Mysql SET field type

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Mysql SET field type

Post by ben » Fri 07 Dec 2007 16:23

Hello!

What is the best way to handle SET fields from MYSQL using MyDAC?
Both for reading and writing. For example I want to check if a value is selected/checked in a specific record in a field SET.

Thanks

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 10 Dec 2007 09:27

MyDAC lets working with SET and ENUM fields like with usual string fields. To get list of accepted values for a SET/ENUM field, use the TCustomMyDataSet.GetFieldEnum method.
Probably, the best way is to avoid using SET and ENUM types, and use lookup tables instead.

Post Reply