Helene
Member³
We recently upgraded to Delphi 2007, and DOA 4.1. After the upgrade we have been experiencing access violations in a particular form when saving data. The behaviour occured consistently.
After debugging I was able to get rid of the access violation, by making a small change to the UpdateStatus method. The following two lines:
were replaced with the following:
The check for a "not-assigned bookmark" made the access violation go away. I don't know why the GetBookmark doesn't return a valid bookmark in this case, but apparently it does not.
However, I am not certain the result which is returned will be correct
?? As far as I can see the result will now be either usUnmodified or usModified, while the correct result should have been usInserted in this case. So what can I do about that?
With regards,
Helene
After debugging I was able to get rid of the access violation, by making a small change to the UpdateStatus method. The following two lines:
Code:
Log := FindChangeLogByBookmark(PInteger(bm)^) as TChangeLogItem;
FreeBookmark(bm);
Code:
try
if assigned(bm) then
Log := FindChangeLogByBookmark(PInteger(bm)^) as TChangeLogItem;
finally
FreeBookmark(bm);
end;
However, I am not certain the result which is returned will be correct

With regards,
Helene