Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Check for changes
Tue, Oct 7 2014 9:00 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

In the core of DBISAM routines I have checked the following function located at dbisamen.pas unit.

function TDataCursor.PerformChangeDetection: Boolean;
begin
  Result:=False;
  if (FExclusive or FMarkedReadOnly) then
     Exit;
  if (FLastDataUpdateStamp <> FDataTable.GetLastDataUpdateStamp) or
     (FLastIndexUpdateStamp <> FDataTable.GetLastIndexUpdateStamp) or
     (FLastBlobUpdateStamp <> FDataTable.GetLastBlobUpdateStamp) then
     Result:=True;
end;

It works as expected but I have one suggestion at least to discuss about. If the table is opened in exclusive mode or the file is marked with read-only flag the result is False and the filters and ranges applied were not checked every record move giving a much better performance specially in while..end loop. So far so good.

But I think the use of exclusive is "almost" impossible like mark the file with read-only flag. In my opinion this check could be expanded to verify Query.ReadOnly property (default is false) but when it is True DBISAM should ignore the checks for change.

I would like to hear other users about it. And may be suggest Tim to change this to the next version
Mon, Oct 27 2014 3:15 PMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

No more opinions ?
Tue, Dec 9 2014 9:37 AMPermanent Link

Arthur Williams

Zarksoft

Avatar

Maybe it's an artifact of your English which confuses me. The code says if the table is read-only don't check for changes. You are suggesting that Tim change the code so that if the table is read only don't check for changes. Why would he do that that when it already does that ?

>>>>>>>>>>>>
Jose Eduardo Helminsky wrote:

No more opinions ?
Tue, Dec 9 2014 2:30 PMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Arthur Williams

Yes. The difference from English and Portuguese are big.

Exclusive or MarkedReadonly means: if the table is opened with exclusive flag or the readonly flag (at windows file system) then do not check changes.

What I am suggesting is about the property ReadOnly at table component. If this is set to True the behaviour should be the same if the table file (DAT) is marked with read-only flag, otherwise what the idea of this property ?
Image