Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread DBISAM 3.30 : Error # 8709 No current record in the table 'xxx'
Fri, Apr 18 2008 5:27 AMPermanent Link

"Frédéric SCHNEIDER"
Hello,

I have often in my program this error when I make a locate...

   if Tbl.RecordCount > 0 then
   begin
     Result := True;
     v := Tbl.FieldValues(KeyFields);
     if VarIsArray(KeyValues) then
     begin
       f := True;
       for i := VarArrayLowBound(v, 1) to VarArrayHighBound(v, 1) do
         if not VarEqual(v[i], KeyValues[i]) then begin f := False; break;
end;
       if f then exit;
     end
     else
     if VarEqual(v, KeyValues) then exit;
   end;

   Result := Tbl.Locate(KeyFields, KeyValues, Options);  <==  Error here !

Kind regards,
Frédéric

Fri, Apr 18 2008 6:54 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frédéric,

<< I have often in my program this error when I make a locate... >>

This is a known issue with DBISAM 3.x.  Unfortunately, we aren't doing any
more updates to 3.x officially, but if you have the 3.x source code, then
this will fix it:

function TDBISAMDataSet.Locate(const KeyFields: string;
                              const KeyValues: Variant;
                              Options: TLocateOptions): Boolean;
begin
  DoBeforeScroll;
  Result:=LocateRecord(KeyFields,KeyValues,Options);
  if Result then
     begin
     try
        Resync([rmExact,rmCenter]);
     except
        on E: Exception do
           begin
           if (ConvertExceptionToStatus(E)=DBISAM_NOCURRREC) then
              Result:=False
           else
              raise;
           end;
     end;
     DoAfterScroll;
     end;
end;

If you don't have the source code, let me know and I'll send you the source
code to the dbisamtb.pas unit so that you can at least put in the above fix.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Apr 18 2008 8:01 AMPermanent Link

"Frédéric SCHNEIDER"
Tim,

Thank you very much for your kind answer, unfortunatly I don't have the
source code, I would be glad to have that unit and do the changes.

Kind regards,
Frédéric

Fri, Apr 18 2008 7:58 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frédéric,

<< Thank you very much for your kind answer, unfortunatly I don't have the
source code, I would be glad to have that unit and do the changes. >>

Please email me privately regarding this (timyoung@elevatesoft.com), and I
will reply with the dbisamtb.pas unit for 3.30.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image