1

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;
Galvion
  • 1,353
  • 7
  • 23
  • 35
  • possible duplicate of [Getting "Multiple-step operation generated errors. Check each status value." error using ADO with SQL server 2008](http://stackoverflow.com/questions/8040609/getting-multiple-step-operation-generated-errors-check-each-status-value-err) – Rob Kennedy Jul 15 '13 at 17:10
  • I did not use or install any SQL Server 2008. And if I try one file by one file. There is no such error. The error come up when I use lot of files selected..... It's a different kind of problem from the link you give me.... – Galvion Jul 15 '13 at 17:31
  • I just want to select some files with opendialog1 and add them into my AdoQuery1 to be listed. But sometimes when I select multiple files this error come up, but sometimes did not. And if I select the one by one, this error did not come up.... – Galvion Jul 15 '13 at 17:39
  • 1
    for DBASE : move out of the `for` loop `AQSource1.Close;` and `AQSource1.Open;` . – moskito-x Jul 15 '13 at 20:33
  • still the same.... It seems it was caused by one of these file name : "D:\[MDS-738] Uruha Mizuki – Let’s Do It Nakadashi-Style at School.jpg" does the ’ effect the AQSource1 ? – Galvion Jul 16 '13 at 01:12
  • Have you tried using **AsDataType** instead of Value? e.g. `AQSource1source_dateadd.AsDateTime := date();` I seem to recall having some odd issues using TField.Value with ADO in the past - but not sure if that is relevant here. – Gerry Coll Jul 16 '13 at 04:14

3 Answers3

5

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

Galvion
  • 1,353
  • 7
  • 23
  • 35
  • Kinda same for me. I got the error when inserting a value >999.99999 in a DECIMAL(8,5) field. As such a field can only store 3 digits on the left side of the decimal point and inserting a value like 1000 gives me this very generic error message. – ArieKanarie Jan 30 '19 at 11:14
1

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

0

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.