Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Views, Can't Undo
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00129134
Message ID:
00129506
Views:
23
>>Duh.... Thanks. What then is =TABLEUPDATE(.F.) ??
>
>
>This is from the VFP 5.0 help file:
>
>"lForce Determines whether changes made to the table or cursor by another user on a network are overwritten. If lForce is true (.T.), any changes made to the table or cursor by another user on a network are overwritten.
>
>If lForce is false (.F.), Visual FoxPro commits changes to the table or cursor, starting with the first record and continuing towards the end of the table or cursor. If a record modified by another user on the network is encountered, Visual FoxPro generates an error.
>
>When Visual FoxPro generates the error, you can handle the error through an ON ERROR routine, and the ON ERROR routine can issue TABLEUPDATE( ) with lForce set to true (.T.) to commit changes to the record. Alternately, if a transaction is in progress, the ON ERROR routine can handle the error and then issue ROLLBACK to revert the table or cursor to its original state.
>
>The default for lForce is false (.F.)."

Rixon (via Craig),

All very true, but the lForce parameter is the SECOND parameter. In VFP5, the parameters are

TABLEUPDATE([nRows [, lForce]] [, cTableAlias | nWorkArea] [, cErrorArray])

Normally, nRows is a value 0, 1 or 2. However, .T. will default to 1 and .F. will default to 0 for multi-row or single-row respectively. Of course multi-row updates only work if you have buffering set accordingly.

There was a major change in this command between VFP3 and VFP5. MS left the T/F parameters working so we didn't have to change every place we called the TableUpdate() function when we upgraded the code.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform