Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions
Message
From
24/04/2002 10:03:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Transactions
Miscellaneous
Thread ID:
00648654
Message ID:
00648654
Views:
44
Hello everybody!

Is it true that VFP native transactions cannot be "spread over" multiple objects?

For Example:

Define Class A

Procedure DoSomething()
loObjA=CREATEOBJECT('DataObjectA')
loObjB=CREATEOBJECT('DataObjectB')

BEGIN TRANSACTION
IF !loObjA.UpdateTableA()
** Rollback if failed
ROLLBACK
RETURN .F.
ENDIF

loObjB.UpdateTableB()
** same kind of IF-clause here
END TRANSACTION
ENDPROC

ENDDEFINE

this won't work... Tables are updated, but there is no "transactional" behavior.


But if I replace those method calls in above class with local code (same things done right in class A), transactions will work.



The tables that the objects DataObjA and DataobjB update, are opened in a form that calls this DoSomething() method in Class A. So they are not opened in objects themselves.

I'm using VFP 5.0.

Could this have something to do with datasessions?

Any help appreciated!

Thanks,
Next
Reply
Map
View

Click here to load this message in the networking platform