Re: How to interrupt a lengthy database-retrieval using TIdHTTP

Giganews Newsgroups
Subject: Re: How to interrupt a lengthy database-retrieval using TIdHTTP
Posted by:  Mark Williams (mark@{removethis}skwirel.com)
Date: Fri, 29 Apr 2005

idhttp1.disconnect or idhttp1.disconnectsocket?

"Staffan Bergbom" <Staffan.Bergb…@lm.se> wrote in message
news:C7BFA802E8C8E240Staffan.Bergb…@lm.se...
> Hi all,
>
> Could someony tell me how I could interrupt a lengthy database-retrieval
in
> an app
> where I use TIdHttp like in the following code:
>
> function TfrmHttp.GetAddressAndCoordinates(ClientId, City, SearchAddress :
> string) : string;
> var
>  IdHTTP1: TIdHTTP;
>  request : string;
> begin
>  try
>    IdHTTP1 := TIdHTTP.Create(Self);
>
>    request := FAddressSearchURL + '/' +
>        'GetAddressAndCoordinates?ClientId=' + ClientId + '&Database=' +
> FDatabase +
>        '&prm1=' + City + '&prm2=' + SearchAddress;
>    try
>      Result := IdHTTP1.Get(request); // Here I would like to be able to
> interrupt if data-fetch takes to long
>    except
>    end;
>  finally
>    FreeAndNil(IdHTTP1);
>  end;
> end;
>
> Regards
> Staffan

Replies

None

In response to

How to interrupt a lengthy database-retrieval using TIdHTTP posted by Staffan Bergbom on Fri, 29 Apr 2005