Q&A

  • 인디 서버가 실행중인 프로그램이 종료가 안돼요!!
안녕하세요~



아래는 indy 서버의 execute 메소드로 클라이언트가 넘겨준 스트링 값



(수량과 상품코드)을 받아서 parts table 의 재고 값을 갱신하는 부분입니다.



상품 현재 재고갱신은 잘됩니다. 그런데 문제는



indy 클라이언트를 종료한 후 서버프로그램을 종료 할려고 하면 종료가 안됩니다..



어떻게 된건지 모르겠습니다



----------서버 execute 소 스 -------------



procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);

var

Msg: String;

npos : integer;

begin

while AThread.Connection.Connected do begin

Msg := AThread.Connection.ReadLn;

npos := pos(':',msg);

with QRtest,QRtest.SQL do begin

Close;Clear;

Add('update parts set curjago=(curjago + :itemcount) where barcode=:barcode ');

Parambyname('itemcount').Asfloat := StrToFloat( Copy(Msg,1,npos-1));

Parambyname('barcode').AsString := Copy(Msg,npos+1,length(msg) );

showmessage('ok');

EXECSQL;

end;

end;



0  COMMENTS