Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to design it in Class?
Message
From
25/05/2001 11:13:41
 
 
To
25/05/2001 11:07:15
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00511522
Message ID:
00511557
Views:
20
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...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform