DBLookupComboBox: variant error
Posted: 14.01.2008, 15:07
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
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