Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



ADO Connection Object Attributes Property

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

Attributes Property Return Values (ADO Connection Object)

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 it is always zero under UNIX.
adXactAbortRetaining
Performs retaining aborts, that is, calling the BeginTrans, CommitTrans, and RollbackTrans methods automatically starts a new transaction. Not all providers support this, and it is always zero under UNIX.

Attributes Property Remarks (ADO Connection Object)

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.

Attributes Property Examples (ADO Connection Object)

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


ContentsPreviousNextIndex