TMyQuery: property 'Required' not set automatically with MySQL 5.0

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

TMyQuery: property 'Required' not set automatically with MySQL 5.0

Post by Hans » Fri 16 Dec 2005 21:25

Hi,

I use the latest MyDac with MySQL 5.0. I wonder why table fields are not set to 'Required' aqutomatically in the fieldlist of e.g. a TMyQuery. Is this a bug or do you have to set this propety manually?
Is this property together with the onvalidate the right way to chek if all required fields are filled with values before you do a post?

best regards,
Hans

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 19 Dec 2005 10:24

Just set TMyQuery.Options.Required to True. Consider setting AUTOINCREMENT fields.

> Is this property together with the onvalidate the right way to chek if all
> required fields are filled with values before you do a post?

This is controversial point. It's too difficult to have a well-defined answer.

Post Reply