Icon View Incident Report

Serious Serious
Reported By: Rolf Frei
Reported On: 2/21/2001
For: Version 2.06 Build 1
# 721 Using Locate to Do a Partial-Key Search on The Active Index When No Records Exists Causes Error

I have a problem here, where I get an error #8709 No current record. I'm using 2.06. The attached sample project and data demonstates the problem. The Locate for the tblUG fails with this error. Please notice that the three group tables (tblHG,tblUG,tblUUG) are connected together as a master/detail/datail and a filter is set.

procedure TForm1.Button1Click(Sender: TObject);
begin
  Query.Open;
      if not tblHG.Active then
         tblHG.Open;
      if tblHG.Locate('maingroup', Query.FieldByName('maingroup').AsString, 
[]) then
         Caption := tblHG.Fields[3].AsString
      else
         Caption := Query.FieldByName('maingroup').AsString;

      if not tblUG.Active then
         tblUG.Open;
      if tblUG.Locate('maingroup;category', VarArrayOf([Query.
FieldByName('maingroup').AsString,
                                                                Query.FieldByName('category').AsString]), []) then
         Caption := tblUG.Fields[3].AsString
      else
         Caption := Query.FieldByName('category').AsString;

      if not tblUUG.Active then
         tblUUG.Open;
      if tblUUG.Locate('maingroup;category;subcategory',
                                 VarArrayOf([Query.FieldByName('maingroup').AsString,
                                                   Query.FieldByName('category').AsString,
                                                   Query.FieldByName('subcategory').AsString]), []) then
         Caption := tblUUG.Fields[3].AsString
      else
         Caption := Query.FieldByName('subcategory').AsString;
end;



Resolution Resolution
Fixed Problem on 2/22/2001 in version 2.07 build 1
Image