Previous PageNext Page

9.3.1 Attributes Property

One or more characteristics of an object. This property is read-only on UNIX.
 

Return Values

Sets or returns a Long value.
 
For a Connection object, the Attributes property is read/write, and its value can be the sum of any one or more of these XactAttributeEnum values (default is zero):
 

Value Description
adXactCommitRetaining
 
Performs retaining commits, that is, calling the CommitTrans method automatically starts a new transaction. Not all providers support this, and is always zero under UNIX.
 
adXactAbortRetaining
 
Performs retaining aborts, that is, calling the RollbackTrans method automatically starts a new transaction. Not all providers support this, and is always zero under UNIX.
 

Remarks

Use the Attributes property to set or return characteristics of Connection objects.
 
When you set multiple attributes, you can sum the appropriate constants. If you set the property value to a sum including incompatible constants, an error occurs.
 

Examples

This Visual Basic example displays the value of the Attributes property for Connection objects. It uses the Name property to display the name of each Field and Property object.
 

Public Sub AttributesX

Dim cnn1 As ADODB.Connection

Dim strCnn As String

' Open connection

strCnn = "driver={SQL Server};server=srv;" & _

"uid=sa;pwd=;database=pubs"

Set cnn1 = New ADODB.Connection

cnn1.Open strCnn

' Display the attributes of the connection.

Debug.Print "Connection attributes = " & _

cnn1.Attributes

cnn1.Close

End Sub


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page