DELPHI ERROR : Multiple-step operation generater error. Check each status value

ぃ、小莉子 提交于 2019-12-23 04:49:20

问题


I have a procedure when click a bitbutton, it open a dialog box to load some files, and add it into AdoQuery (AQSource1). When I add some files, this error appear :

"Multiple-step operation generater error. Check each status value."

Only when I add multiple files selected. But if I selected a file by a file there is no error at all... But sometimes if I select multiple files this error did not show up either.... Kind a confusing for me...

How to fix this ? in simple way...

PS: I use Windows 7 Pro SP1 64bit, Embarcadero Delphi 2010

procedure TFMain1.btImgLoad1Click(Sender: TObject);
var i : integer;
    strFilename : string;
begin
  if OpenDialog1.Execute then
  begin
//    Add selected file to DBase and show it on DBGrid
    for i := 0 to openDialog1.Files.Count-1 do
    begin
//      ShowMessage(openDialog1.Files[i]);
      strfilename := openDialog1.Files[i];

      AQSource1.Append;
      AQSource1source_fileurl.Value := strFilename;
      AQSource1source_filename.Value := ExtractFileName(strfilename);
      AQSource1source_dateadd.Value := date();
      AQSource1source_timeadd.Value := Time();
      AQSource1.Post;

      AQSource1.Close;
      AQSource1.Open;
    end;
  end;
end;

回答1:


Ah... Finally I found what the cause of it. It lies on the "Field size" in Access and AdoQuery in Delphi. The field size for both is 50. When I change them to 255, whola.... the error is gone....

So based on my conclusion, the error for "Multiple-step operation generater error. Check each status value." for my case was caused by the FIELD SIZE... Thanks ^^




回答2:


this error usually occur when there is a values change on the server side and the changes are not being reflected on the client.for example when on/before insert trigger that change field value . so all you need that is to change Adotable1.CursorLocation to the option clUseServer . no thing else. good luck



来源:https://stackoverflow.com/questions/17659830/delphi-error-multiple-step-operation-generater-error-check-each-status-value

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!