[Lazarus] External SIGSEGV (random) when assigning TBookmark
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Tue Nov 3 20:45:39 CET 2015
Leonardo M. Ramé wrote:
> El 03/11/15 a las 04:40, Michael Van Canneyt escribió:
>>
>>
>> On Mon, 2 Nov 2015, Leonardo M. Ramé wrote:
>>
>>>
>>> El 01/11/15 a las 09:25, Leonardo M. Ramé escribió:
>>>> Hi, I don't use data aware controls too often, but as I'm updating a
>>>> legacy application I have to use them.
>>>> ...
>>>
>>> I finally solved this by getting the value of a primary key, then
>>> after TSQLQuery.refresh I do a locate for that key, works like a charm.
>>>
>>> What I don't get is what's the purpouse of TBookmark, I thought it was
>>> made for solving the problem I had.
>>
>> Bookmarks are only valid until the dataset closes.
>> I will add this to the documentation.
>>
>> Michael.
>>
>
> Ok, but apart from Closing/Opening or Refresh, is there any other way to
> reload a dataset without closing it? TSqlQuery.Refresh also loses the
> Bookmark.
Even if you could reload it, I'd have thought that the only valid way of
positioning would be by locating against a column (preferably known to
have an index). After all, the content of the table might have had gross
changes due to the actions of other users, and potentially the layout
might have changed.
I find myself moving away from data-aware controls and instead executing
queries in a background thread, to try to avoid UI glitches while the
backend's doing its stuff.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list