TheSwamp
Code Red => .NET => Topic started by: Viktor on October 30, 2008, 12:40:02 PM
-
I notice that there are a few different ways to access objects in dwg database so I thought I'd ask what is the difference?
Some use the following approach:
tr.getobject(objid,openforread)
and some use
objid.getobject(openforread)
Both are preceeded by db.transactionmanager.starttransaction
and
Both use tr.commit when done.
Are there problems with one over the other? do transactions work different in the above scenarios?
Thanks,
Viktor.
-
The only difference is that ObjectId.GetObject() implicitly uses the top-level transaction, whereas with tr.GetObject(), you are specifying the transaction explicitly.