with qry_temp do     
  begin
  close;
  sql.clear;
  sql.add(Format('select * from case_table where 代码=''%s''',[DBGD_many.Fields[1].asstring]));
  Execsql;
  end;
我用if Qry_temp.Fields[0].AsString<>'' then来判断是否有这个记录,却报错
List index out of bounds(0),不知该如何解决??求救!!