<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 January 2018 at 05:18, Werner Pamler via Lazarus <span dir="ltr"><<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Am 10.01.2018 um 21:57 schrieb Werner Pamler via Lazarus:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Am 10.01.2018 um 20:21 schrieb Gabor Boros via Lazarus:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't know. Attached a simple example. With it I can reproduce the problem on Windows too. So the problem is not Qt specific.<br>
</blockquote>
<br>
You did not assign a Datasource to the DBLookupCombo. This is where the value picked from the combo is stored to. Without a Datasource I consider the present hehavior to be correct.<br>
<br>
Maybe another dev can comment who is more familiar with databases than me.<br>
</blockquote>
</span></blockquote></div><br></div><div class="gmail_extra">I'm experiencing issues with this control as well. I'm also not assigning Datasource. Not assigned Datasource is a valid use for this control, with several Delphi and Lazarus examples out there, including on our wiki. Unbound use is used for keeping the active record in a dataset syncronised with the contents of the DBLookupCombobox.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The code I'm using was derived from here:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://wiki.freepascal.org/TDBLookupComboBox#Unbound_use">http://wiki.freepascal.org/TDBLookupComboBox#Unbound_use</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I've not investigated the code supplied by by Gabor Boros, but in my case the combobox looks fine, until you change selection, then all entries in the Combobox are cleared and no OnScroll is fired in the List Datasource.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">For now I've worked around this by adding a Dummy TBufDataset. I'm pointing the DBLookupCombo.Datasource to the TBufDataset, and the datafield to a variant field in TBufDataset.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This kind of works, though I'm now experiencing a random AccessViolation. The code I've quickly inserted the TBufDataset workaround into is complex (I'm cascading multiple DBLookupCombobox's, changing one affects all others after it), and I inserted the TBufDataset workaround in a hurry. For now, I'm assuming the memory issue is mine.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I plan on looking at Gabor's code tonight, see if we're experiencing the same issue.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers</div><div class="gmail_extra"><br></div><div class="gmail_extra">Mike</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>