Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Beginner - Business object
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00612101
Message ID:
00612569
Views:
29
Hi,
Thank yuo for information.
I used to read the online documentation of West-wind connection (WWC). The framework is much similar as what you mentioned - using SCATTER to store data to odata member. I am trying to have my business object too.

My base class:
business.Save()

SELECT (calias)
SCATTER NAME THIS.oData MEMO

if TABLEUPDATE(.t.,.f.,calias)
   return .t.
else
   **error handle
   return .f.
endif
I would like to know, how to handle transaction in bussines object?

Let's say, I have simple business object. Customer, saleorder and lineitems. Once a sales done, I have to update all of these relevant table. Where should I place my BEGIN TRANSACTION?

I subclass business object to be my customer, salesorder and lineitems (for example).

How should my code look like for transaction ?

**What to put before this

**BEGN TRANSACTION - If I place the statement here, will VFP confuse?

SalesOrder.Save()
Lineitem.save()

**What to put after that to end transaction

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