出错信息是:
  Arguments are of the wrong type are out of acceptable range,or are in conflict with one anther.

解决方案 »

  1.   

    begin
       score:=0;   //已定义了的变量
      for m:=1 to 20 do    //统计成绩
       begin
        dm.ADOTable1.RecNo:=a[m-1];//错误之处。 a[m]----->a[m-1]
        if dm.ADOTable1.FieldByName('yesorno').AsBoolean=true then
          score:=score+5;
       end;
       dm.ADOTable2.Last;
       dm.ADOTable2.Edit;
       dm.ADOTable2.FieldByName('score').AsInteger:=score;//把成绩导入到成绩表
       dm.ADOTable2.Post;                 
       dm.ADOTable1.Active:=false;
      end;
      

  2.   

    begin
      dm.ADOTable1.Open;//可以多次运行;
       score:=0;   //已定义了的变量
      for m:=1 to 20 do    //统计成绩
       begin
        dm.ADOTable1.RecNo:=a[m];//如果从0开始的话,就[m - 1]
        if dm.ADOTable1.FieldByName('yesorno').AsBoolean=true then
          score:=score+5;
       end;
       dm.ADOTable2.Last;
       dm.ADOTable2.Edit;
       dm.ADOTable2.FieldByName('score').AsInteger:=score;//把成绩导入到成绩表
       dm.ADOTable2.Post;                 
       dm.ADOTable1.Active:=false;
      end;