Galvion
Galvion

Reputation: 1371

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

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;

Upvotes: 1

Views: 9246

Answers (3)

I have similar experience, In one instance, when I have synthesized the required SQL text, and did not care about alias name & the ADO makes that alias automatically (which is a long name) this error occurs. the solution is to give an alias directly in the statement to by pass this short coming.

Upvotes: 0

Mohammed ashraf
Mohammed ashraf

Reputation: 21

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

Upvotes: 1

Galvion
Galvion

Reputation: 1371

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 ^^

Upvotes: 5

Related Questions