用如下方法实现数据的修改,报错为ADOTabCorporation:DataSet not in edit or insert model。可我设置了adotabcorporation.Edit,这怎么办呢? adotabcorporation.open; adotabcorporation.Edit; adotabcorporation.First; while not adotabcorporation.Eof do begin if adotabcorporation.FieldByName('corporation').AsString ='A' then adotabcorporation.FieldByName('corporation').AsString:='B'; adotabcorporation.Next; end; adotabcorporation.Post; adotabcorporation.close; 另外用如下语句实现数据修改也会出错,原因是什么?怎么改呢? sql:='update corporation set corporation=''+B+'' where corporation=''+A+''; qryremarkcor.Close; qryremarkcor.SQL.Clear; qryremarkcor.SQL.Add(sql); qryremarkcor.Open;
----------------------------------------------
编程之路真如铁,而今迈步从头越