Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
END TRANSACTION works like ROLLBACK !!!
Message
De
22/02/1999 05:17:51
 
 
À
18/02/1999 15:05:56
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00188654
Message ID:
00189900
Vues:
15
>>use Mytable && A Table With An Incorrect Record That Belong To A Dbc
>>begin Transaction
>>append Blank
>>brow && You See The New Record
>
>Insert a
=tableupdate()
here. That's the effective part of the transaction which you didn't run, so nothing actually happened.
>
>>end Transaction
>>brow && The New Record Is Lost !!!
>>
>>do You Have Any Workarround Avaiable ?

I don't have buffering enabled because is very much slower, (nearly 10 times to complete a transaction).

thanks anyway

I found a workarround for this problem and I hope you could use it.
Here's the example

*** You must test every table before BEGIN TRANSACTION

PPA=ADIR(PPB,LOCFILE("mytable.DBF"))

SELECT 0
USE mytable AGAIN
PPT=HEADER()+1+RECC()*RECSIZE()

IF PPB(2)<>PPT .AND. PPB(2)<>PPT-1
do error
ENDIF

USE


procedure error

** ONE ALTERNATIVE

CLOSE DATA ALL
USE MYTABLE EXCL
APPEND BLANK
DELETE
PACK


*** ANOTHER ALTERNATIVE IF YOU HAVE FOXFIX

CLOSE DATA ALL
=FIXDBF("MYTABLE.DBF",1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform