Link to home
Start Free TrialLog in
Avatar of pucko73
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.IdTCPServer1Connect(AContext: TIdContext);
begin
   sl :=TstringList.Create;
  MyDataStr:= '';

end;

procedure TForm1.IdTCPServer1Disconnect(AContext: TIdContext);
begin
  sl.Text:= MyDataStr;
  sl.SaveToFile(MyDir+ \GetUniqeFileName);
  sl.Free;
  end;
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial