ADO » Connection » Attributes

long = connectionobject.Attributes
connectionobject.Attributes = long

Sets or returns a long value defining the characteristics of a Connection object.

The Attributes property indicates the transaction attributes of a Connection object. It returns or sets a long value that is the sum of one or more of the XactAttributeEnum constants. The default is zero.
Not all providers support this property.
XactAttributeEnum Constants
You can set multiple attributes by adding together the values. If you set the property value to an invalid sum, an error is generated.

Constant Value Description
adXactAbortRetaining 262144 Ensures that calling the RollbackTrans method automatically starts a new transaction
adXactCommitRetaining 131072 Ensures that calling the CommitlbackTrans method automatically starts a new transaction
393216 A new transaction automatically starts after the previous is finished


objConnection.Attributes = adXactAbortRetaining AND adXactCommitRetaining

See Also: