General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only