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

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

Integer field AsVariant gives a EDatabaseError

Postby apiove » 18.10.2006, 09:02

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.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest