TDBAdvEdit and persistance?


I want to use the persistence function to restore only the history list from a TDBAdvEdit component
Unfortunately the Text-Property gets also restored from registry and the db field value gets overwritten showing wrong value.

Anyone dealt with this?


I'm not sure how you want to combine both DB & registry persistence? Registry persistence will always persist the last entered value while DB binding should show the value of the current active record. I'm not sure how you expect this to be handled at the same time? 

Sorry, perhaps I must explain better.
I only want the suggestions from the history to be persistent, not the value (this comes from the DB of course but gets overwritten from registry value). Is this possible?

I have many subforms that will be created dynamically at runtime. The history of edit fields on that form is lost whenever this form is generated.

A TDBAdvEdit persists at this time the text value, not the lookup values. It is a good idea to also provide the option to persist the lookup values but we'll need to extend the component for that.

The Persistence settings already work ok with the lookup history.
Problem is, it is doing too much by also saving and restoring the Text.
As you mention already, this doesn't make sense with DBAdvEdit.

Sorry, I thought you wanted the lookup to be persisted to a dataset too.

You're correct that Text shouldn't be persisted for a TDBAdvEdit and we've extended the component to handle this. The next update will address this.