Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace / Delete and Tableupdate
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Replace / Delete and Tableupdate
Divers
Thread ID:
00310754
Message ID:
00310754
Vues:
59
Hi again,

I'm aplying the good code from Jim Booth for doing transactions, and everything is ok, well I have a problem:

I update i.e. three tables: table1, table2 and table3
in table1 I delete one record
and in table2 and table2 I create one more, just a sample.

The problem is cause I have a field in table1 to track the datetime when a record is deleted (dtdeleted field)

I use:

SELECT table1
REPLACE dtdeleted WITH DATETIME()
llret = TABLEUPDATE(1,.F.,"table1")
DELETE

I cannot do with this:

SELECT table1
REPLACE dtdeleted WITH DATETIME()
DELETE
llret = TABLEUPDATE(1,.F.,"table1")

cause the replace is ignored!! ???

... add records to table2 and table3...

and then BEGIN TRANSACT.... in Jim's way

the problem is if the transaction fails, the tableupdate before the DELETE doesn't reverts (I know this is normal).

But how can do for reverting ALL in the transaction?
Pablo Roca
Clavo Congelados, S.A. (La Coruna - Spain)
Sysop of PortalFox

Join MasFoxPro campaign
http://www.masfoxpro.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform