0

I'm building a simple delphi program to transfer data from dbf file into sql server. The dbf file it self contain a memo field which data is saved on .fpt file. When i try to open it with ADOQuery, when I tried to scroll down to the next row, I got an error message

Multi-step operation generated errors. check each status value

this is my connection string and query syntax

Provider=VFPOLEDB.1;Data Source=D:\LEARNING CENTER\DATSPP;Mode=Share Deny None;Extended Properties="";User ID="";Password="";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN=""

select * from dpb.dbf

even when i'm not running the program and try to scroll the dbgrid, i also get this error.

can someone possibly tell me where i'm doing wrong?

  • http://stackoverflow.com/questions/17659830/delphi-error-multiple-step-operation-generater-error-check-each-status-value – t1f Dec 08 '16 at 07:45
  • http://www.adopenstatic.com/faq/80040e21.asp – t1f Dec 08 '16 at 07:46
  • Tons of answers to this problem both on google and SO. Do a search before you ask – t1f Dec 08 '16 at 07:46
  • I check one by one field size and the size is bigger than it's value, and the sql table is have more bigger size than enough to accept value from dbf file, but i still got this error, that's why i ask this problem here – ryuusoultaker Dec 08 '16 at 07:48
  • Check the 2nd link – t1f Dec 08 '16 at 07:50
  • i open other file with memo and it works just fine. first I thought it was the size of the value inside the memo field that cause the problem, so i checked it one by one and it still give me an error. and no, the fieldname has no space. i come here bcz i've searching over google and got no result that can explain me where i'm doing wrong :) – ryuusoultaker Dec 08 '16 at 07:58
  • a) Is this .fpt file in the same folder as your .dbf one? b) Do you have any utility program which *will* open the .dbf file successfully? c) What do you mean by "i open other file with memo and it works just fine"? d) You shouldn't need the ".dbf" in your Select statement. – MartynA Dec 08 '16 at 08:40
  • a) yes, the fpt file is in the same folder as my dbf file. b) i can open the dbf file successfully from foxpro and dbf manager. c) i made just same mini program to open another dbf file that have a memo field, and it works just fine :) d) i've delete it, thankyou :) – ryuusoultaker Dec 08 '16 at 08:49

1 Answers1

1

"Multi-Step" errors are not a problem with one cause but a generalised report of some deeper problem arising from a huge number of possible causes. The sources of these problems will vary hugely by database type and provider involved.

In this situation I would break the problem down into separately testable steps.

First, simplify the query. Modify it so that it returns only a single, specific column into your grid (not the memo). If that works then keep adding columns to your query and grid, one by one, until the problem occurs. Then focus on what it might be about the column that triggers the issue.

(It may not occur at all; the issue might be due to the use of select * in the first place)

If you cannot return even a single column into your grid, then take the grid itself out of the equation. Simply return a value into a field and scroll through the results one record at a time in that field.

If that works then you can focus on how the grid behaviour might be involved.

The problem may be caused by the way the grid and the data source are attempting to navigate through the result set. If you've eliminated other possible explanations then you might investigate retrieving your entire query result into a TClientDataSet (or other in-memory dataset).

If you can do that then you can attach your grid to that in-memory dataset.

Unfortunately none of the above are guaranteed to be an answer to your specific problem, but hopefully may set you on the track to finding that answer.

Deltics
  • 22,162
  • 2
  • 42
  • 70