ADO » Objects » Field

The ADO Field object contains information about a single field (column) in a Recordset object.

A Recordset object is composed of a collection of zero or more Field objects. Appropriately, this collection is called the Fields Collection. Only the Record and Recordset objects have a Fields Collection.

Properties

ActualSize

Syntax: long = fieldobject.ActualSize
fieldobject.ActualSize = long

Returns a long value that is the actual length of a Field object's value.

Attributes

Syntax: long = fieldobject.Attributes

Returns a long value that is the sum of one or more FieldAttributeEnum valuesthat define the characteristics of a Field object.

DataFormat Property

Sets or returns the format for displaying data.

DefinedSize

Syntax: long = fieldobject.DefinedSize

Returns a long value that is the defined (maximum possible) size (data capacity) of a Field object.

Name

Syntax: string = fieldobject.Name
fieldobject.Name = string

Sets or returns a string value that is the name of the Field object.

NumericScale

Syntax: byte = fieldobject.NumericScale

Sets or returns a byte value that is the number of digits allowed to theright of the decimal point for a numeric Field object.

OriginalValue

Syntax: variant = fieldobject.OriginalValue

Returns a variant that is the value of a field in the database before any changes were made in the current session.

Precision

Syntax: byte = fieldobject.Precision

Sets or returns a byte value that is the maximum number of digits allowed in a numeric Field object.

Status

Syntax: FieldStatusEnum = fieldobject.Status

Returns a FieldStatusEnum value that allows you to determine if a field has beensuccessfully added.

Type

Syntax: DataTypeEnum = fieldobject.Type

Sets or returns a DataTypeEnum value that specifies the data type.

UnderlyingValue

Syntax: Variant = fieldobject.UnderlyingValue

Returns a variant that is the current field value as stored in the database.

Value

Syntax: variant = fieldobject.Value

fieldobject.Value = variant

Returns a variant that is the current (visible) field value in the current recordset.

Methods

AppendChunk

Syntax: fieldobject.AppendChunk (Data)

Used to append a large amount (i.e., a large chunk) of text or binary data to a Field object.

GetChunk

Syntax: variable = fieldobject.GetChunk (Size)

Returns a variant that contains the specified amount (size) of binary or text data.

Collections

Properties

The Properties Collection is a collection of Property objects. Each Property object contains a single piece of information, called a dynamic property, about the database provider. By referring to the Properties Collection, each connection to a provider can be tailored specifically by ADO to suit the exact needs of that provider.

See Also: