pucko73
asked on
Delphi Indy tcp server
Hello.
I try to create an application
that takes all data from a printout and save to a uniqe filename (or insert into a database)
it seems to work as long as I don't try to print two documents at the same time.
How can I solve this...
My code::
private
sl : TstringList;
MyDataStr : string;
.....
procedure TfForm1.IdTCPServer1Connec t(AContext : TIdContext);
begin
sl :=TstringList.Create;
MyDataStr:= '';
end;
procedure TForm1.IdTCPServer1Disconn ect(AConte xt: TIdContext);
begin
sl.Text:= MyDataStr;
sl.SaveToFile(MyDir+ \GetUniqeFileName);
sl.Free;
end;
I try to create an application
that takes all data from a printout and save to a uniqe filename (or insert into a database)
it seems to work as long as I don't try to print two documents at the same time.
How can I solve this...
My code::
private
sl : TstringList;
MyDataStr : string;
.....
procedure TfForm1.IdTCPServer1Connec
begin
sl :=TstringList.Create;
MyDataStr:= '';
end;
procedure TForm1.IdTCPServer1Disconn
begin
sl.Text:= MyDataStr;
sl.SaveToFile(MyDir+ \GetUniqeFileName);
sl.Free;
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.