CAdoBase.Attributesproperty
For a **Property** object, the **Attributes** property is read-only, and its value can be the sum of any one or more **PropertyAttributesEnum** values.
Syntax
PROPERTY Attributes () AS LONG
PROPERTY Attributes (BYVAL lAttr AS LONG)
Parameters
| Name | Description | |
|---|---|---|
lAttr | Can be the sum of any one or more ParameterAttributesEnum values. The default is adParamSigned. |
Return value
LONG. One or more ParameterAttributesEnum values.
Description
For a Property object, the Attributes property is read-only, and its value can be the sum of any one or more PropertyAttributesEnum values.
Remarks
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.
Example
#include once "AfxNova/CADODB.inc" USING AfxNova
' // Open the connection DIM pConnection AS CAdoConnection pConnection.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=biblio.mdb")
' // Open the recordset DIM pRecordset AS CAdoRecordset pRecordset.Open("SELECT * FROM Publishers ORDER BY PubID", pConnection, adOpenKeyset, adLockOptimistic, adCmdText)
' // Parse the Properties collection DIM pProperties AS CAdoProperties = pRecordset.Properties DIM nCount AS LONG = pProperties.Count FOR i AS LONG = 0 TO nCount - 1 DIM pProperty AS CAdoProperty = pProperties.Item(i) PRINT "Property name: "; pProperty.Name; " - Attributes: "; WSTR(pProperty.Attributes) NEXT
Reference
- Include file
CAdoProperties.inc - Documented in Databases/ADO Classes/ADO.md
- Topic: CADODB