Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why error 1585 (Update Conflict)?
Message
From
23/07/2004 17:43:18
 
 
To
22/07/2004 06:56:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00926357
Message ID:
00927481
Views:
28
Hi Marcia,

>Having said that, the reason youo are getting this update conflict is because VFP is trying to TABLEUPDATE Your customer table when you move the record pointer. Consider how VFP determines that there is an update conflict. It compares OLDVAL() of the fields in the table to CURVAL(). If they are different, the conclusion is that someone else sneaked in and updated the table before you saved your changes. In this case, this is what is happening in your two forms. The OLDVAL() of your customer name in the Invoice form might be "Smith". So you open your customer form and change the spelling to "Smythe" and save it. When you go back to the invoice form and VFP tries to TABLEUPATE() the customer table for you, OLDVAL() = "Smith" and CURVAL() = "Smythe" - hence the update conflict.

Yup, I do understand why it happens but was figuring out how it happened in my form.
Thanks heavens! I found the culprit line:
= SEEK( This.Value, "Customer", "Code" )   *--> this is where error occurs

WITH THIS.PARENT
   .edtAddress = Customer.Address   ** THIS IS THE CULPRIT! **
   .txtTerms = Customer.Terms
ENDWITH
I had edtAddress' ControlSource as Customer.Address. So, when the code above is executed the Customer.Address field was replace with the same value!

So, the culprit line should be:
= SEEK( This.Value, "Customer", "Code" )   *--> this is where error occurs

WITH THIS.PARENT
   *.edtAddress = Customer.Address   ** THIS IS THE CULPRIT! **
   .edtAddress.Refresh()             ** this is the change... stupid me!
   .txtTerms = Customer.Terms
ENDWITH
Thanks just the same Marcia...

Sincerely,
Dennis
Previous
Reply
Map
View

Click here to load this message in the networking platform