tags:

views:

254

answers:

2

On a form, I have a Quantum Grid and some db-aware editcomponents. When appending a new record in the grid, typing some editvalues both in the grid and the separate editcompoennts, I get an error:

EOleException: Row cannot be located for updating. Some values may have been chenged since it was last read

After some googling, I think changing the 'Update Criteria'-property from adCriteriaAllCols to adCriteriaKey may be the right solution. But how, and when, do I do that on a Adonis query?

A: 

Although I don't use Adonis, I believe there is a possibility it use the same mechanism TClientDataset (CDS) uses to identify the fields that compose the primary key: the property TField.ProviderFlags.

I believe it could be a good place to start looking.

Fabricio Araujo
Actually, all the dbcomponents are thrown away now. Recreated the gui using regular components, made a middleware with objects, and handling the object to database transition - It sure was faster than messing with adonis...
Vegar
It's really so mysterious ? Wow...
Fabricio Araujo
Actually, I use clientdatasets for everything... And since Andreas (Andreas Hausladen) got a speed up for them, things are even better.
Fabricio Araujo
A: 

if your dataset contains an autoincrement field or one or more fields have default values then this may be the problem. After calling Post fields change their value in the db but that may not be detected by your dataset

Joe Meyer
That may have been the problem. The code was rewritten a long time ago, though, to get rid of any direct data binding and problems like this one.
Vegar