LongInt and Integer

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Maksim Krivohizha
Posts: 2
Joined: Fri 10 Feb 2006 11:26

LongInt and Integer

Post by Maksim Krivohizha » Fri 10 Feb 2006 12:06

Hi all!

Database fields described as follow:
....
`crid` int(4) unsigned NOT NULL auto_increment,
`cgid` int(4) unsigned NOT NULL default '0',
....

All this types represented as TLargeIntField in MyDAC.
Manual definition of this fields as TIntegerField cause error:
Type mismatch for field 'crid', expecting: Integer actual: Largelnt.
How can i use TIntegerField instead of TLargeIntField?

MyDac 4.00.2.8.

Tnx.

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

Post by Ikar » Fri 10 Feb 2006 14:11

MyDAC tries to choose the most appropriate field type for server data type. The most appropriate field type for UNSIGNED INT data type is TLargeIntField. To use TIntegerField, you should define your fields as INT (without UNSIGNED).

Maksim Krivohizha
Posts: 2
Joined: Fri 10 Feb 2006 11:26

Post by Maksim Krivohizha » Fri 10 Feb 2006 16:13

Really, i redefine fields in database as you advise - it work, now we have what we need.

Thank you!

Post Reply