Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: salad <oil@xxxxxxxxxxx>
- Date: Thu, 15 Dec 2005 20:37:08 GMT
David W. Fenton wrote:
"daniel" <danielblw@xxxxxxxxx> wrote in
news:1134667506.911789.241680@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
yeah, I updateing the files exist on the form. public sub cal() squery = "SELECT * from Table1 where serial = " & !Serial Set rs = db.OpenRecordset(squery, dbOpenDynaset, dbSeeChanges)
With rs .Edit !Field1 = 10 .Update End With
end sub when I change field2 on the form, I call Cal(). If i change field2 again, then the error shows up.
Why are you using a separate recordset to update data that is
already opened in the recordset behind the form you're using to edit
it?
Secondly, if you *are* going to update the data through something
than the obvious method of changing the form's underlying data, why
in the world are you opening a recordset with .Edit and .Update
instead of just using a SQL UPDATE query:
UPDATE Table1 SET Field1=10 where serial = " & !Serial
That will be faster and hold a lock on the table a shorter period of
time.
But I question why you are doing this in the first place.
Why not just update the field in the form's underlying recordset?
Doing it your way is just asking for exactly the kind of problem
you're seeing.
Exactly. .
- References:
- The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: daniel
- Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: salad
- Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: daniel
- Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: salad
- Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: daniel
- Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- From: David W. Fenton
- The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- Prev by Date: Re: Loosing Db connection?!?!?!
- Next by Date: Re: Removing duplicates from query, but not from table
- Previous by thread: Re: The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record
- Next by thread: invalid operation
- Index(es):
Relevant Pages
|