Product Home Page | Developer Site | Version | |
One or more characteristics of an object. This property is read-only on UNIX.
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):
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.
This Visual Basic example displays the value of the Attributes property for Connection objects. It uses the ADO Field Object 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 © 2003 Sun Microsystems, Inc. All rights reserved.