Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to design it in Class?
Message
De
25/05/2001 11:13:41
 
 
À
25/05/2001 11:07:15
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00511522
Message ID:
00511557
Vues:
21
Hi,
I am using table buffering. I plan to code it as the following:
Customer.Add(cust_id, cust_name)

INSERT INTO tblCustomer VALUES(cust_id, cust_name)

IF TABLEUPDATE(1,.F.,"tblCustomer")
   RETURN .T.
ENDIF

Account.Add(Cust_id)

LOCAL lcAccNo

lcAccNo = GETNEXTNO()
INSERT INTO tblAccount VALUES(lcAccNo, Cust_ID)

IF TABLEUPDATE(1,.F.,"tblAccount")
   RETURN .T.
ENDIF
Does it design correct?
The problem now is, where should I place my BEGIN TRANSACTION, TABLREVERT()?
As I know, If I put BEGIN TRANSACTION in function that call the both, VFP will cofuse with "WHAT SHOULD BE ROLLBACK", it may rollback but return unexpected result.

Any ideas or sample?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform