0

I have a TADOQuery with a Lookup field that references a string field in another TADOQuery. I've connected a TcxDBTextEdit to the lookup field, but the value in the lookup table in the database is not getting updated.

Is it even possible to use a lookup field in this manner, or are lookup fields always read-only?

Magnus
  • 17,157
  • 19
  • 104
  • 189
  • 2
    Your q needs a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) to show exactly how you are attempting to update the field in the lookup table. – MartynA Jun 27 '19 at 08:42
  • @MartynA It's all done in design mode. I'm simply setting the `DataBinding`>`DataField` property of the `TcxDBTextEdit` to `_lookup_Name`, which is the lookup field that I've defined in the `TADOQuery`. All of the components have their `ReadOnly` properties set to `false`. – Magnus Jun 27 '19 at 09:11
  • You have to go master-detail to be able to edit data in the second table. – Brian Jun 27 '19 at 10:15
  • 1
    You can't write to a lookup field. Lookup fields are read-only. As the name says, they're for *looking up data* from other tables. If you need the values in a lookup field updated, you do that in the table that the values are being read from. I'm voting to close this as *unable to reproduce*, which is the closest thing to *this is working exactly as designed and intended - nothing to see here* that is available on SO. – Ken White Jun 27 '19 at 19:49

0 Answers0