Hi everyone,
I'm using Delphi 7 + Zeos 6.6.1 beta + MySQL5 and have a table TC where field TCTypeID refers to a value in table TCType. On a form I've added a DBLookupCombobox and set it's parameter like:
DataField = TCTypeID
DataSource = DSTC
ListSource = DSTCType
ListFieldName = TCType
KeyFieldName = TCTypeID
Now the Combobox contains all TCTypes (like it should) but when I select a different value from the drop down list I get an error: "Cannot access field 'TCTypeID' as type Variant".
I've checked if both TCTypeID have the same datatype and both are int(10) unsigned.
If I change the TCTypeID manually from within a normal DBEdit box the TCType in the DBLookupComboBox is changed. So it seems that the Combobox is working properly.
Any idea how this can be fixed?
Thanks,
Jona
DBLookupComboBox: variant error
Moderators: gto, cipto_kh, EgonHugeist
Jona, Hello friends, I am having problems with dblookupcombobox, for example have a table and the table CUSTOMER CITY, when I'm registering a client I click the dblookupcombobox and he shows me all the cities Indexed .. so far so good ... However when I select any city it's a variant of error, following error: "EDatabaseError whit message'Cannot access field 'codicia' as type Variant 'Process stoped. I realized that there are several colleagues with the same problem but no solution. If someone can help me please reply to this topic or send email to marcio@visaosistemas.com.br. Thanks for attention. I am using Delphi7 Mysql5.1 and Zeos 7.0.0.