Paul, you are a lifesaver!
It never occurred to me to go through areas, and it solves my immediate problem on a test server. Deploying at the customer over the weekend, so hopefully that goes well.
Jarek, here are the answers to your questions/comments:
1. Code that crashes a test system in client/server mode (this is an abridged version with error checking and most of the string processing removed for clarity):
global
updating
procedure addPriceMn()
begin
record PLVc PLr;
string 255 tstr;
OpenFile("importdata.txt");
/* while (TestEOF==false) begin
RecordNew(PLr);
tstr = ImportField;
PLr.ArtCode = tstr;
tstr = ImportField;
PLr.PLCode = tstr;
tstr = ImportField;
PLr.ExVatPrice = StringToVal(tstr,M4Val);
RecordStore(PLr,true);
if (NextImportLine(true)) then begin end;
end;
*/ CloseFile;
return;
end;
2. OK Invoices (non stop) works as expected if I run it manually. Invoices get OKed, server doesn't hang. Haven't tried to set it up to run automatically, since the problem apparently lies in the "CloseFile" area.
3. I am sure there are other ways, Paul kindly pointed out one of them.
However, I still think fixing this bug is better than many people rewriting code with workarounds?
Additional question: are there any limits to the size of areas? I have another customer due to update to 8.4 who uses similar functionality to receive item data from a customer, and those files are several MB in size...