Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BEGIN TRANSACTION - TABLEUPDATE
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00178898
Message ID:
00178908
Views:
32
The code I put here is inside this code:
FOR i = 1 TO m.nTablesUsed
     SELECT (aTablesUsed[m.i,1])
     DO CASE
(checks for free table, buffering not on,
deleted record, and so on.  The code below
is in one of the cases)

     ENDCASE
ENDFOR
The code generally works when there isn't an update conflict. When there is one, the behavior I describe could be correct for all I know. Or is it?

>Are you shure you are in the right work area? To be sure, you should use the following syntax: TableUpdate(.T., .F., "MyTable")
>
>HTH
>
>>I have this code for updating records in my vfp3 app, which originally came from WIZSTYLE:
>>
>>BEGIN TRANSACTION
>>* Try to update all records in selected table
>>m.lSuccess = TableUpdate(.T.,.F.)	&&successful update
>>IF m.lSuccess
>>     END TRANSACTION
>>     LOOP
>>ENDIF
>>ROLLBACK
>>
>>If you run this code when the record was previously modified by another user, TABLEUPDATE returns .T., which is contrary to what the Help says it should do. Is that because it is wrapped in the transaction? The END TRANSACTION generates the error, of course. Under what conditions would a TABLEUPDATE wrapped in a transaction return .F.?
>>
>>When used as described, I get Error 1585, which I should trap. What other common errors occur here that I should also trap with specific messages?
Previous
Reply
Map
View

Click here to load this message in the networking platform