Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Bug when changing name and using locate v1.08
Mon, Mar 10 2008 4:36 PMPermanent Link

"keith crusius"
Depending on where I call the table.indexname function below, the prior
function fails.  The index is on a float field called order.  There is also
an index on the integer PK field,

//this fails b/c the bof flag gets set and I can't move up even though I
know it's not at the first record...
   t1.IndexName := 'byorder';  //having the indexname function here caused
improper result
   if t1.locate('pk',apk,[]) then begin
       //t1.bof is still false at this point (as it should be)
       t1.Prior;
       //t1.bof is now true and the record pointer didn't move, but should
have (i know i am not at the beginning of the file)
       if not t1.Bof then b := t1.fieldbyname('order').AsFloat
         else b := 0;
       ...


//this works as expected
   if t1.locate('pk',apk,[]) then begin
       t1.IndexName := 'byorder';  //moving this line here gets the
expected result
       t1.Prior;  //record pointer moved and still not bof as expected
       if not t1.Bof then b := t1.fieldbyname('order').AsFloat
         else b := 0;
       ...
Tue, Mar 11 2008 4:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< Depending on where I call the table.indexname function below, the prior
function fails.  The index is on a float field called order.  There is also
an index on the integer PK field, >>

<< //t1.bof is now true and the record pointer didn't move, but should
have (i know i am not at the beginning of the file) >>

Is there actually another row prior to the current row at this point ?   If
so, then please send me a sample project that reproduces this.   Please be
sure to include the database catalog (edbdatabase.edbcat) and the table
files (.edbtbl, .edbidx, and, possibly, .edbblb).

--
Tim Young
Elevate Software
www.elevatesoft.com

Image