Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 1 of 1 total
Thread Anyone suggest a better way
Tue, Dec 2 2008 9:38 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

With the email part of my app I'm going to do a wadge of antispam tests befor downloading the body of the email. Those that survive will have the encoded email stored in iemInbound. A separate background process will decode them and do some sorting out.  This background thread will be started before the email download is finished so more emails might be added to iemInbound as its processing. I've come up with the idea below so that I (hopefully) catch these.

 iemInbound.Filter := 'NOT _DecodeProblem';
 iemInbound.Filtered := True;
 iemInbound.First;
 while not iemInbound.RecordCount > 0 do begin
  iemInbound.First;
  try

  except
   MakeLogEntry(ltDecodeProblem, MainIn, 'Decode problem encountered', nil, logDecodingError);
   iemInbound.Edit;
   iemInbound.FieldByName('_DecodeProblem').AsBoolean := True;
   iemInbound.Post;
  end;
 end;

Any better ideas?

Roy Lambert

Image