AutoIncFields are not set automaticly

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply

AutoIncFields are not set automaticly

Post by trying » Sun 19 Feb 2006 10:59


I am still testing MyDAC.

I C++Builder 6 pro + MySQL 4.1.16
I have a master key:

INTEGER + AUTOINCREMENT and when I use fields editor for retrieve all fields in table this key is set with TIntegerField.


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

Post by Antaeus » Mon 20 Feb 2006 09:16

It is normal behaviour. Because AUTO_INCREMENT keyword doesn't determine field data type at all, it only means that default value for the field will be calculated and set by the server. Note that MySQL Server allows setting values of the fields, defined as AUTO_INCREMENT, manually.


Post by trying » Mon 20 Feb 2006 09:20


I set this field to autoincfield manually and works well.


Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain

Post by GEswin » Mon 20 Feb 2006 21:48

Another good solution is RefreshRecord after a post.

Post Reply