Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate fails?
Message
From
05/06/1998 10:01:31
 
 
To
05/06/1998 09:56:45
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00105114
Message ID:
00105119
Views:
39
>My user reported that an invoice could not be saved after it was edited. My reprocess was automatic and when they pressed ESC, they got the error - record is unlocked. I found that tableupdate of a view was the culprit and solved the problem by doing FLOCK of both the updateable tables before executing tableupdate. (the view update 2 base tables)
>
>The invoice with the same set of data runs well on local machine.
>
>What happen? Doesn't tableupdate know how to lock the base tables properly?
>
>Begin transaction
>if flock('table1') and flock('table2')
> if !tableupdate(1,.f.,'invoice_view')
> unlock in table1
> unlock in table2
> */* Error Handling
> RETURN
> else
> end transaction
> endif
>endif

Yes, tableupdate() knows how and where to lock. Using FLOCK() on table you provide high probability of locking conflicts.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform