Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scatter
Message
De
22/07/1997 08:46:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/07/1997 12:21:07
Chiang Jeffrey
Paramoun Air Sea Svcs P/L
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00040596
Message ID:
00041096
Vues:
47
>Thx but how do you use a transaction in a OOP environment,...which button should I create to do that?
>
>Jeff

Here is a simple scenario :
Set buffering mode to optimistic table
Create a button that will dosave
In click event ;
llUpdatefailure = .f.
begin transaction
for i = 1 to numtables
if !(updatable(table+ltrim(str(i))) and tableupdate(0,.f.,table+ltrim(str(i))))
*Inform update is unsuccesfull
llUpdatefailure = .t.
rollback
exit
endif
endfor
if !llUpdatefailure
end transaction
endif

Of course this is a simple backbone. When you gonna make it a clas you should take into account overridden buffering modes, local or remoteviews etc. You can take a look at wizstyles.vcx - txtbtns class. It also contains a simplified save routine.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform