Integer field AsVariant gives a EDatabaseError

In this forum all bug reports concerning the 6.x branch will be gahtered. You have the possibility to track the bug fix process.

Moderators: EgonHugeist, mdaems

Post Reply
User avatar
apiove
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 04.01.2006, 15:03

Integer field AsVariant gives a EDatabaseError

Post by apiove »

I've download Zeoslib-6.5.1-rev113
I use Delphi 7 and 5.0.26-community-nt

Code: Select all

DROP TABLE IF EXISTS `abc_pm`.`vendor_of`;
CREATE TABLE  `abc_pm`.`vendor_of` (
  `vendor_id` int(10) unsigned default NULL,
  `producer_id` int(10) unsigned default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
I when I try to access to an integer field:

Code: Select all

  ZTable1.Edit; // the same happen also with TZQuery
  ZTable1.FieldByName('producer_id').AsVariant := 1; << exception raised
  ZTable1.Post;
Exception message: Cannot access field producer_id as type Variant

For this, is not possible to use lookup fields

NOTE: I'VE FIXED THE PROBLEM USING INTEGER SIGNED FIELD TYPE

Bye.
Post Reply