Page 1 of 1

Problem with LookUp in Combo and Grid

Posted: Sat 30 Jun 2007 09:06
by TommyEldrup
I have 2 tables:
t1 has a relation to t2 with a field of type Integer (10) unsigned

I am trying to make a DBLookupComboBox and a Lookup in the CRDBGrid.

But no matter what I try, I get the error:
Cannot access field ManufactsID as type Variant.

The DBLookupComboBox seems to work, until I make a change. Then I get above error.

In the CRDBGrid I get the error, when Activating the table.

I have tried with MySQL 5.0 and 5.1 and I have tried to change the field type to Int (20) and Medium Integer (8). But I cannot see why this should be nessary.

I have been using microOlap's DAC and there was no problems!

Hope you can fix this/help me...

Kind regards,
Tommy

Posted: Sat 30 Jun 2007 10:21
by TommyEldrup
I have now installed ver 5.10 and changed the situation a bit.

Now I don't get the error in the CRDBGrid, it just show a blank dead field.

...

Posted: Tue 03 Jul 2007 07:09
by Antaeus
I could not reproduce the problem.
Please send me a complete small sample at evgeniyD*crlab*com to demonstrate it, including script to create and fill table.

Also supply me the following information:
- exact version of your IDE (including personality name for Delphi 2005, and BDS 2006);
- exact version of MyDAC (including build number). You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

Posted: Tue 03 Jul 2007 09:16
by TommyEldrup
I actually found a work around for this, here in the forum.

I am using INT(10) unsigned for my Primary/Forreign keys.

I changed them to INT(11) signed and it works! Both the DBLookupComboBox and the CRDBGrid.

Will this be fixed to work with unsigned integers? or long integers?

Posted: Wed 04 Jul 2007 13:47
by Antaeus
This is not a MyDAC restriction. This is a restriction of Delphi code. Probably there is a patch for Delpi that fixes this problem.