Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ADO Parameter Object Attributes Property

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

Attributes Property Return Values (ADO Parameter Object)

Sets or returns a Long value.

Attributes Property Parameters (ADO Parameter Object)

For an ADO Parameter Object, the Attributes property is read/write, and its value can be the sum of any one or more of these ParameterAttributesEnum values:

Value

Description

adParamSigned

Default. The parameter accepts signed values.

adParamNullable

The parameter accepts Null values.

adParamLong

The parameter accepts long binary data.

Attributes Property Remarks (ADO Parameter Object)

Use the Attributes property to set or return characteristics of Parameter 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 Parameter Object)

This Visual Basic example displays the value of the Attributes property for Connection, Field, and Property objects. It uses the ADO Parameter Object Name Property to display the name of each Field and 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 the attributes of the connection.

Debug.Print "Connection attributes = " & _

cnn1.Attributes

' Display attributes of the Employee table fields

Debug.Print "Field attributes:"

For Each fldLoop In rstEmployees.Fields

Debug.Print " " & fldLoop.Name & " = " & _

fldLoop.Attributes

Next fldLoop

' 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 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.