Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need guidance on transactions
Message
From
21/05/2002 23:09:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Need guidance on transactions
Miscellaneous
Thread ID:
00659716
Message ID:
00659716
Views:
56
Wrapping up my first all view based app and I wonder if this method of handling the updates looks reasonable. No error trapping or resolution yet - just getting basics down. Thanks.
BEGIN TRANSACTION
SELECT vporders
llret = TABLEUPDATE(.T.,.F.)
IF llret
  SELECT vpordets
  llret = TABLEUPDATE(.T.,.F.)
  IF llret
    SELECT styles
    llret = TABLEUPDATE(.T.,.F.)
    IF llret
      END TRANSACTION
    ELSE
      ROLLBACK
      * option to bail the entire session
      *!*  =TABLEREVERT(.T.,"vpordets")
      *!*  =TABLEREVERT(.T.,"vporders")
      *!*  =TABLEREVERT(.T.,"styles")
    ENDIF
  ENDIF
ELSE
  THISFORM.goodsave = .F.
ENDIF
Whadaya think?
Next
Reply
Map
View

Click here to load this message in the networking platform