Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger Failed for Append Blank
Message
 
To
03/01/1999 02:15:54
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172229
Message ID:
00172261
Views:
31
>1. Disable all buttons and fields not needed during edit
>2. Enable all buttons and fields that are needed during edit
>3. BEGIN TRANSACTION
>4. APPEND BLANK
Dan,

First your assumption is incorrect, the rules and triggers fire when the action occurs and the again at the end transaction. Secondly it is not a good idea to begin a transactiuon thne turn control over to the user. Much better is to buffer the tables, do teh aoend blank, let the user muck around with the record. When the user is doen and they click the save button, do whatever validationm you needs nd do whatever clacuilations you need, then begin transaction, tableupdate all of the tables and then end transaction, like this;

* Save code
* Do validations

* Do calculations

LOCAL llRollBack
llRollBack = .F.

BEGIN TRANSACTION
IF NOT TableUpdate(1,.F.,"FirstAlias")
llRollBack = .T.
ELSE
IF NOT TableUpdate(1,.F.,"SecondAlias")
llRollBack = .T.
ELSE
IF NOT TanleUpdate(1,.F.,"ThirdAlias")
llRollBack = .T.
ENDIF
ENDIF
ENDIF

IF llRollBack
ROLLBACK
TableRevert(.T.,"FirstAlias")
TableRevert(.T.,"SecondAlias")
TableRevert(.T.,"ThirdAlias")
ELSE
END TRANSACTION
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform