Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread While Not EOF
Fri, Jan 5 2007 8:31 AMPermanent Link

Deneys
    Hi all

   For some reason It might have been the upgrade from Prev ver to 4.25 build 2
   But the below code use to work but no longer

===============================================
         
         Main.PriceDB.Active := True;
         Main.PriceDB.SetRange([Value1],[Value1]);
         Main.PriceDB.First;

//I tested the record cound and there are 5034 records
         
         While Not Main.PriceDB.Eof do
          Begin
//It only loops once in the While loop and then exsits so only one record gets updated

           Main.PriceDB.Edit;
           Main.PriceDB.FieldByName('sName').AsString  := Value2;
           Main.PriceDB.Post;
           Main.PriceDB.Next;
          end;
          Main.PriceDB.Active := False;


=========================================

Please help

Fri, Jan 5 2007 10:25 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Deneys


If PriceDB is indexed on sname and that's the index in use you could be moving out of the range after the post hence eof is true

Roy Lambert
Tue, Jan 9 2007 1:34 AMPermanent Link

Deneys
Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Deneys


If PriceDB is indexed on sname and that's the index in use you could be moving out of the
range after the post hence eof is true

Roy Lambert


Hi Roy,

Thanks for your help I have found a solution great support

Deneys De Beer


Image