General information
Title:
Creating a VFP component with MTS
I have created an Active-X DLL in VFP and I want to use CreateInstance in the object context. I can create the MTS Context object just fine, but calling GetObjectContext() returns .NULL.
I created a MTS package with my DLL and indicated that it "Support Transactions". In the VFP object's Init event, I have the following code.
Thanks for your help!
*** MTS object
This.oMTS = CREATEOBJECT("MTXAS.APPSERVER.1")
IF NOT TYPE("This.oMTS") == "O" OR ISNULL(This.oMTS)
ERROR "Cannot create object"
ENDIF
*** MTS Context
This.oMTSContext = This.oMTS.GetObjectContext()
IF NOT TYPE("This.oMTSContext") == "O"
This.oMTSContext = .NULL.
ENDIF
*** Error object
IF NOT ISNULL(This.oMTSContext)
This.oError = This.oMTSContext.CreateInstance("wwwShared.Error")
ELSE
***** It always does this! Why?
This.oError = CREATEOBJECT("wwwShared.Error")
ENDIF
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