Re: Append and post - with standardvalues



I have found that when using ADO, you get messages like this even when they
make no sense from the perspective of your code and what the program is
doing between the time a record is displayed and updated. The only thing
you can do is learn the proper superstitions to obey in order to get it to
work.

One thing I've found is that there is some odd interaction between
data-aware grids and datasources that cause problems if the grid has focus
when you INSERT a record in the underlying table. I've suggested to other
people that they move focus from such grids before the INSERT and they have
confirmed that this also eliminated their problem. Using DELETE can also
produce errors that seem to make no sense.

Another thing that works badly with ADO is if you have more than one
database connection. I had amazing concurrency problems until I changed to
use only on connection component in the app.

At the moment, I do not remember any unique problems with an update process
that does not involve INSERT. In other words, I don't remember any problems
with EDIT/POST that are not covered by ensuring that focus is not on a
data-aware grid component.

I'm looking forward to moving some D5/ADO apps to D2007 Enterprise in hopes
that the connectivity components there will not exhibit so many strange
behaviors as ADO.

mIKE

"Pontus Berg" <pontus@xxxxxxxxxxxxxxxxx> wrote in message
news:4828cbdd$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Howdy all,

In my work with an Access database from Delphi 2007, appending and then
posting is straight forward.

However, a few of the values cannot be modified. They raise an
"EOleException" with the message (direct translation from the Swedish
error message) "The row for updating cannot be found. Some values might
have changed since they were last read".

If I close the application (or even closed the database and open it again)
then things work fine when I edit them.

I think I have identified the problem to be for fields where I have
defined a "default value" (Swedish term is "standard value")

Editing any field with a default value fails with the above error.

Any suggestion what to do?

/Pontus Berg


.



Relevant Pages

  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Requery of Listbox does not display new data
    ... add a record to the database. ... Then the Lisbox control's requery method is ... The ADO command is run using a connection string to the mdb containing the ... Dim cmd As ADODB.Command ...
    (microsoft.public.access.formscoding)