Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace / Delete and Tableupdate
Message
De
30/12/1999 23:21:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00310754
Message ID:
00310819
Vues:
14
This sounds strange, Pablo, but try to reverse the order of what you are doing with SET DELETED OFF. Therefore, you do the DELETE, the REPLACE datetime, and then the TABLEUPDATE().


>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?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform