Board index » off-topic » Problem 10259: Couldn't perform the edit because another user changed the record

Problem 10259: Couldn't perform the edit because another user changed the record


2004-12-23 07:16:42 PM
off-topic4
I have a client who try to save a record in a computer and it keeps on
showing the error 'Couldn't perform the edit because another user changed
the record'. There is no problem on saving another record in the same
table. But there is no other user modified the record and even if the user
restored and tried to save the record again the error still occurs. It
already happened several times but on specific computers only.
However, when use another computer to save the same record, the record can
be saved successfully. And then the computer that could not save the record
can save the record now.
I cannot identify the difference between the 2 computers and there is
nothing special when compared the problem record with other records.
It uses Cached Update and apply the the problem properly occurs when
applying the updates to database or when try to commit the transaction. The
database server is Oracle 9i. The transIsolation used in TDatabase in the
program is tiReadCommitted.
Is there any hint how the BDE check the records so such problem occurs? Is
there any BDE settings which may cause such problem?
 
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

"Chris Lee" < XXXX@XXXXX.COM >wrote
Quote
... a client who tries to save a record in a computer
and it keeps on showing the error 'Couldn't perform
the edit because another user changed the record'.
There is no problem on saving another record in the
same table. But there is no other user modifying the
record and even if the user restored and tried to save
the record again the error still occurs. It already
happened several times but on specific computers only.

However, when use another computer to save the
same record, the record can be saved successfully.
And then the computer that could not save the record
can save the record now.

I cannot identify the difference between the 2 computers
and there is nothing special when compared the problem
record with other records.
Chris, I think that if the precision setting of the FPU is
different on the two machines and there is a floating point
number in what you are saving, then it can create a small
difference that will create a difference in the keys being
checked for the "changed" test.
Here is an easy test to catch this longshot problem:
Write a Delphi test program called ShowFPUCW with
one form with one edit box and with the following code in
the FormCreate event to show the state of the FPU's
control word in hexadecimal.
function GetX87CW: word;
ASM
FStCW [Result]
End;
Edit1.Text := Format('FPU CW = $%x',[GetX87CW]);
(* CW Mask bits prevent interrupt when true:
(Pending interrupt flags in status word have matching positions.) )
$0001 -- IM (Invalid op interrupt Mask)
$0002 -- DM (Denormalized op interrupt Mask)
$0004 -- ZM (Zero divide interrupt Mask)
$0008 -- OM (Overflow interrupt Mask)
$0010 -- UM (Underflow interrupt Mask)
$0020 -- PM (Loss of precision interrupt Mask) }
{ CW Control bits change operation:
$0300 -- PC (Precision Control mask)
$0C00 -- RC (Rounding Control mask)
$1000 -- IC (Infinity Control mask) *)
It should show $1332 or $1372 in the edit box.
If it shows anything besides a "3" in the second position
on the PC's with the "record changed" problem then you
may be able to prevent it by dropping the following line
Set8087CW($1332);
into your problem program's DPR file just after the "begin"
line and casting a vote for See QualityCentral report #5928.
Regards, JohnH
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

"Chris Lee" < XXXX@XXXXX.COM >wrote:
Quote
I have a client who try to save a record in a computer and it keeps on
showing the error 'Couldn't perform the edit because another user changed
the record'. There is no problem on saving another record in the same
table. But there is no other user modified the record and even if the user
restored and tried to save the record again the error still occurs. It
already happened several times but on specific computers only.

However, when use another computer to save the same record, the record can
be saved successfully. And then the computer that could not save the record
can save the record now.

I cannot identify the difference between the 2 computers and there is
nothing special when compared the problem record with other records.

It uses Cached Update and apply the the problem properly occurs when
applying the updates to database or when try to commit the transaction. The
database server is Oracle 9i. The transIsolation used in TDatabase in the
program is tiReadCommitted.

Is there any hint how the BDE check the records so such problem occurs? Is
there any BDE settings which may cause such problem?

You might also want to run the SQL monitor that ships with delphi (not sure if it's all versions...i'm using delphi 5).
The BDE checks to see if a user modified the record by issuing an SQL statement SELECT that uses all the fields from your dataset. For example: if you have a client table it'll say something like
SELECT * FROM Client WHERE FirstName = X AND LastName = Y AND SomeField = Z AND ....
and it'll use your original values as parameters. If it's doesn't find a record, it assumes someone else modified the record. This is not always the case...For example I once had an SQLServer 2000 TimeStamp (an 8 byte VarBinary value that is global to the current database and incremented whenever a field is modified/inserted...)The bde did not read in the value when I opened the dataset so when it ran the SELECT statement it used no value for that particular field. SQL Server doesn't allow you
to modify these fields/or have null values ... etc so it would never find that particular field and assumed it was modified by someone else. Like I said, run the monitor and check for clues as to how the BDE is trying to locate the record you are trying to update, and compare them to the values that were read when you opened your dataset. You should be able to figure it out.
 

{smallsort}

Re:Problem 10259: Couldn't perform the edit because another user changed the record

Chris,
What did you find to be the problem?
Rgds, JohnH
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

Dear John,
Thank you very much for your help and you helped me a lot.
Since the problem occurs in client's site I sent the test program to them to
check but they still haven't give me the result yet.
I will also let you know after I get the result.
Best regards,
Chris Lee.
"John Herbster" <herb-sci1_AT_sbcglobal.net>wrote in message
Quote
Chris,
What did you find to be the problem?
Rgds, JohnH
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

Dear John,
I am only sure that their computers produce 2 different results. But both
kinds of computers may cause the problem. Anyway, I revised the source
codes according to your suggestion and see whether the problem will be
solved in the future.
Thank you again for your help.
Best regards,
Chris Lee.
"John Herbster" <herb-sci1_AT_sbcglobal.net>wrote in message
Quote
Chris,
What did you find to be the problem?
Rgds, JohnH
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

"Chris Lee" < XXXX@XXXXX.COM >wrote
Quote
I am only sure that their computers produce 2 different
results. ... Anyway, I revised the source codes
according to your suggestion and see whether the
problem will be solved in the future.
Chris, I gather that you were not able to run the little
program to show the state of the FPU's CW on the
computers in question. Too bad, because if you had,
then you would know if the subject of QualityCentral
report #5928 was your problem. Good luck, JohnH
 

Re:Problem 10259: Couldn't perform the edit because another user changed the record

Dear John,
You may have misunderstood my meaning.
They can run the little program and produced different results in different
computers. However, they said that the problem of the production system I
developed occurs on both kinds of computers. And I just revised the source
codes of the production system according to your suggestion and see whether
the problem can be solved.
Best regards,
Chris Lee.
"John Herbster" <herb-sci1_AT_sbcglobal.net>wrote in message
Quote

"Chris Lee" < XXXX@XXXXX.COM >wrote

>I am only sure that their computers produce 2 different
>results. ... Anyway, I revised the source codes
>according to your suggestion and see whether the
>problem will be solved in the future.

Chris, I gather that you were not able to run the little
program to show the state of the FPU's CW on the
computers in question. Too bad, because if you had,
then you would know if the subject of QualityCentral
report #5928 was your problem. Good luck, JohnH