![]() |
![]() |
|||||||||||
|
Value | Description |
adPropNotSupported |
The property is not supported by the provider. |
adPropRequired |
The user must specify a value for this property before the data source is initialized. |
adPropOptional |
The user does not need to specify a value for this property before the data source is initialized. |
adPropRead |
The user can read the property. |
adPropWrite |
The user can set the property. |
Remarks
Use the Attributes property to set or return characteristics of Property objects.Examples
This Visual Basic example displays the value of the Attributes property for Property objects. It uses the Name property to display the name of each Property object.Public Sub AttributesX
Dim cnn1 As ADODB.Connection
Dim rstEmployees As ADODB.Recordset
Dim fldLoop As ADODB.Field
Dim proLoop As ADODB.Property
Dim strCnn As String
' Open connection and recordset.
strCnn = "driver={SQL Server};server=srv;" & _
"uid=sa;pwd=;database=pubs"
Set cnn1 = New ADODB.Connection
cnn1.Open strCnn
Set rstEmployees = New ADODB.Recordset
rstEmployees.Open "employee", cnn1, , ,
adCmdTable
' Display attributes of the Employee table properties.
Debug.Print "Property attributes:"
For Each proLoop In rstEmployees.Properties
Debug.Print " " & proLoop.Name & " = " & _
proLoop.Attributes
Next proLoop
rstEmployees.Close
cnn1.Close
End Sub
Copyright © 2000 Chili!Soft