Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating objects under inside a transaction

Status
Not open for further replies.

pankajv

Programmer
Jan 30, 2002
178
0
0
IN
Can I create an object(supports transaction) within a method of an object(requires transaction) using CreateObject().
 

Dear ;

Yes, You can I create an object(supports transaction) within a method of an object(requires transaction) using CreateObject().

Muhammad Essa Mughal
Software Engineer
essamughal@yahoo.com
 
Actually if you want to get a object to be in the same transaction you HAVE TO use this

getobjectcontext.CreateInstance("blahlib.blahobj")

this passes the current object's Context to the new object.

Using CreateObject() may create a new seperate transaction if the object being created is marked as requiring a transaction. Thus calling SetAbort in the calling component will NOT roll back the created components changes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top