var
 i:integer ;
begin  for i:=200 to adodataset.RecordCount do
  begin
    adodataset.FieldByName(custom):=i;
    adodataset.post;
    adodataset.next;
  end;
end;

解决方案 »

  1.   

    sorry,错了。var
     j,i:integer ;
    begin
      j:=200;
      for i:=1 to adodataset.RecordCount do
      begin
        adodataset.FieldByName(custom):=i;
        adodataset.post;
        j:=j+1;
        adodataset.next;
      end;
    end;
      

  2.   

    update table set customno=customno+200
      

  3.   

    如赋值是每一条都一样或有规律的可用。
    update 表名 set 列名=新值 where customno>=200
    如赋值是每一条都不一样,那就只有写程序来一条条处理了。
      

  4.   

    还有错。var
     j,i:integer ;
    begin
      j:=200;
      for i:=1 to adodataset.RecordCount do
      begin
        adodataset.FieldByName(custom):=j;///改为j
        adodataset.post;
        j:=j+1;
        adodataset.next;
      end;
    end;
      

  5.   

    如果使用SQL SERVER 可以用存储过程,并且用游标逐条解决,可以保证速度
      

  6.   

    update table set customno = customno + RowNum
      

  7.   

    var
     j,i:integer ;
    begin
      j:=200;
      for i:=1 to adodataset.RecordCount do
      begin
        adodataset.edit;
        adodataset.FieldByName(custom).asinteger := j;
        adodataset.post;
        j:=j+1;
        adodataset.next;
      end;
    end;
      

  8.   

    如果用sql的话,我觉得还是首先把该字段清空,然后再赋值
      

  9.   

    adotable.first
    i:=200
    while not adotable.eof do
    begin
    adotable.edit;
    adotable.fieldbyname('fieldname').asinteger:=i;
    i:=i+1;
    adotable.next;
    end;
    adotable.post;
      

  10.   

    adotable.first
    i:=200
    while not adotable.eof do
    begin
    adotable.edit;
    adotable.fieldbyname('custom').asinteger:=i;
    i:=i+1;
    adotable.next;
    end;
    adotable.post;