I’m new in RO, having a basic question :
My app getting random delays for around 3 sec when I’m running my app.
I was thinking that main reason it’s a WiFi I have which is slow, and after some researching I have implemented threads mentioned in this post
Yet it wasn’t good. By knocking down some functions have noticed that Save Briefcase causing random delays, may be because HDD speed related issues.
The question I have : what approach will be advisable for saving Briefcase in thread of a background process?
I’m trying to run SaveBriefcase in a thread and after few editing/saving getting “Invalid pointer operation” error and DBGrid all messed up with Error happened: List index out of bonds(364)
Just for sake of test I didn’t have created cloned table, may be this is a reason? :
procedure TDM.SaveBriefcase;
var
lbriefcase: TDABaseBriefcase;
begin
lbriefcase := TDAFolderBriefcase.Create(GetBriefcaseFileName,False,False);
if fInvalidateBriefcase then begin
if AnsiSameText(BRIEFCASE_DATA_VERSION_INVALID, lbriefcase.PropValues[BRIEFCASE_DATA_VERSION_KEY]) then begin
end
else
begin
lbriefcase.PropValues[BRIEFCASE_DATA_VERSION_KEY] := BRIEFCASE_DATA_VERSION_INVALID;
lbriefcase.WriteBriefcase;
end
end
else begin
PutTablesToBriefcase(lbriefcase);
lbriefcase.PropValues[BRIEFCASE_DATA_VERSION_KEY] := BRIEFCASE_DATA_VERSION;
lbriefcase.PropValues[BRIEFCASE_UPDATE_DATE_KEY] := DateTimeToStr(Now);
lbriefcase.WriteBriefcase;
end
end;
procedure TDM.ThrSaveBriefcase;
begin
TTask.Run( Procedure
begin
SaveBriefcase;
end);
end;
if you used cloned table for DBGrid and main table for briefcase, the same error would be present?
can you create a simple testcase that reproduces this issue, pls?
you can attach it here or send to support@ directly