Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you ROLLBACK a view
Message
De
04/03/1998 13:08:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
04/03/1998 12:27:29
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00082524
Message ID:
00082540
Vues:
30
>I have 2.6 tables that I need to be able to place in a tranaction and be able to roll back. You can't rollback a table that is not a member of a database container, but Jim Booth pointed out to me that I could use an Updateable view. What is the procedure for rolling back an updateable view? Here is roughly what I am doing, but it doesn't seem to work:
>
>TableA (2.6 table)
>ViewA (Updateable view made up of fields from TableA)
>
>CURSORSETPROP("buffering", 5, "TableA")
>
>BEGIN TRANSACTION
> IF !UpdateTableA()
> llSuccess = .F.
> ENDIF
> IF !UpdateTableB()
> llSuccess = .F.
> ENDIF
> IF !UpdateTableC()
> llSuccess = .F.
> ENDIF
> IF llSuccess = .T.
> ENDTRANSACTION
> ELSE
> ROLLBACK
> ENDIF
>
>********************
>Method UpdateTableA (UdateTableB and UpdateTableC the same)
>
>SELECT ViewA
>APPEND BLANK
>REPLACE ViewA.Field1 WITH "Test",
> ViewA.Field2 WITH "Test2"
>
>TABLEUPDATE(0,.T., "TableA")
Ed, I think you'd better set the view updateable and update it. This would update base tables provided that you set the correct update options.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform