<html>
<head>
<title>Field Object </title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Description">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">Field Object </td>
<td valign="top" class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">
<synopsis>
Dim <span class="replaceable">field</span> As ADODB.Field</synopsis>


<p>The Field object represents an individual column within a Recordset
or a Record object's Fields collection. A Field contains
metadata properties that define its datatype, size, and precision.</p>

</td></tr>
</table>
</div>
<div id="Field.ActualSize">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.ActualSize Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">actualsize = field</span>.ActualSize</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The ActualSize property returns the actual length of a field's
value.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Long</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The ActualSize property returns a number indicating how many bytes
are stored in the specified field, as opposed to the maximum number
of bytes allowed (indicated through the DefinedSize property). If the
length of the Field object's value cannot be determined by ADO,
<span class="LITERAL">adUnknown</span> is returned.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.DefinedSize Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.AppendChunk">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.AppendChunk </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">field</span>.AppendChunk <span class="replaceable">Data</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The AppendChunk method is used to append data to a large data or
binary field.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Arguments</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt><span class="replaceable">Data</span> (Variant)</dt>
<dd><p>Contains the large amount of data that you wish to append to the
current Field object.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The AppendChunk method appends large amounts of either text or binary
data to an existing Field object. This can come in very useful when
the current system contains limited system memory with regard to the
amount needed for the operation to be performed. With the AppendChunk
method, you can add the data to your Field object in increments as
you see fit.</p>


<p>You can use the AppendChunk method with a Field object only if the
<span class="LITERAL">adFldLong</span> bit of the Arguments property of that
Field object is set to <span class="LITERAL">True</span>.</p>


<p>By calling the AppendChunk method for the first time, you overwrite
any data that may already be in that field. With each additional call
to the AppendChunk method, the data is appended to the end of the
pre-existing data. ADO assumes that you are finished appending to a
particular field in a recordset if you then read or write data in
another field in the same recordset. What this means is that if you
call the AppendChunk method again on the original field, the data is
once again cleared, as if it were the first call to the method.
Reading or writing data in another Recordset object will not cause
this action to occur, unless it is a clone of the original Recordset
object.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.Attributes Property, FieldAttributeEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Attributes">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Attributes Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">field</span>.Attributes = <span class="replaceable">attributes</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Attributes property sets or returns specific characteristics
about the Field object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Long</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Attributes property is read-only; it can be a sum of the values
from the FieldAttributesEnum enumeration listed in <link linkend="ado-APP-E">Appendix E</link> indicating the characteristics of the Field
object, such as whether it is updatable or represents a row
identifier.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>FieldAttributesEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.DataFormat">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.DataFormat Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>&nbsp;</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The DataFormat property links the current Field object to a
data-bound control.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>StdDataFormat</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The DataFormat property is both read- and write-enabled. It accepts
and returns a StdDataFormat object that is used to attach a bound
object.</p>




<tip id="ch13-265-fm2xml" role="ora">
<p>The DataFormat property for the Field object is not documented at all
in the ADO help files -- however, the DataFormat property is used
in other Microsoft objects outside of ADO.</p>

</tip>

</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.DefinedSize">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.DefinedSize Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">definedsize = field</span>.DefinedSize</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The DefinedSize property represents the size, in bytes, of the
capacity of a Field object's datatype.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Long</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The DefinedSize property is used to determine the data capacity of a
Field object's Value property, in bytes. This property differs
from the ActualSize property, which indicates how many bytes of the
defined datatype size are actually being used.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.ActualSize Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.GetChunk">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.GetChunk Method </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>Set <span class="replaceable">value = field</span>.GetChunk(<span class="replaceable">NumBytes</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The GetChunk method returns the specified number of bytes or
characters from the specified field.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Arguments</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt><span class="replaceable">NumBytes</span></dt>
<dd><p>The <span class="replaceable">NumBytes</span> parameter is a Long value
representing the number of bytes or characters that you want to
receive.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Returns</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Variant</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The GetChunk method gets pieces of information from a Field object
that belongs to a Fields collection of an open Recordset object. If
the Arguments property of the Field object is set to
<span class="LITERAL">adFldLong</span>, you can use the GetChunk method on that
field.</p>


<p>The first call to GetChunk retrieves the number of bytes specified in
the method call, from the beginning of the field. All subsequent
calls to GetChunk will return data starting from where the last call
to GetChunk left off. If the amount of bytes or characters in the
Field object is fewer than the amount that you requested, only the
remainder is returned without padding for the difference.</p>


<p>When you read or write to another field within the same Recordset
object (one that is not a clone of that recordset), ADO assumes that
you are done retrieving chunks from that particular Field object. The
next call to GetChunk will perform as if it were the first,
retrieving the first number of bytes or characters that you request.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.Arguments Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Name">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Name Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>Set <span class="replaceable">value = field</span>.GetChunk(NumBytes)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Name property specifies the name for the current Field object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>String</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Name property retrieves a Field object from the Fields
collection. Names do not have to be unique within collections.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.NumericScale">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.NumericScale Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">field</span>.NumericScale = <span class="replaceable">numericscale</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The NumericScale property indicates the scale of numeric values in
the current Field object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Byte</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The read-only NumericScale property identifies how many bytes are
used to the right of the decimal point for a Field object containing
a numeric value.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.OriginalValue">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.OriginalValue Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">originalvalue = field</span>.OriginalValue</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The OriginalValue property returns the value that belonged to a field
before any changes were made to it.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Variant</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>In Immediate mode, the OriginalValue property returns the value of a
field in the current record before any changes were made to it. In
other words, the OriginalValue property is the value of the field
when the last Update method was called. This is the value that is
replaced in the Field object when the CancelUpdate method is called.</p>


<p>In Batch Update mode, the OriginalValue property returns the value of
a field in the current record before any changes were made to it. In
other words, the OriginalValue property is the value of the field
when the last UpdateBatch method was called. This is the value that
is replaced in the Field object when the CancelBatch method is
called.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Recordset.CancelBatch Method, Recordset.CancelUpdate Method,
Recordset.Update Method, Recordset.UpdateBatch Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Precision">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Precision Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">precision = field</span>.Precision</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Precision property represents the degree of precision of a
numeric value within the current Field object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Byte</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Precision property is read-only for the Field object. This
property returns a Byte value that indicates the total number of
digits used to represent a value for a numeric Field object.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Properties">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Properties Collection </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>Set <span class="replaceable">properties = field</span>.Properties</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Properties collection contains characteristics specific to the
Field object for the currently used provider.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Properties (Collection object)</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Properties collection class contains a Property class instance
for each property specific to the Field object for the data provider.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Status">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Status Property </td>
<td class="COMPATIBILITY">(Versions 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">status = field</span>.Type</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Status property indicates the status of the current Field object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>FieldStatusEnum</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The default value for the Status property is
<span class="LITERAL">adFieldOK</span>.</p>


<p>After a call to the Record or Recordset's Update method if an
error has occurred the Status property of each Field object is set to
a value from the FieldStatusEnum enumeration, describing the problem.</p>


<p>If you are adding and deleting Field objects to and from the Fields
collection, the Status property can tell you whether they have been
successfully added or deleted.</p>


<p>The Status property can hold more than one FieldStatusEnum
enumeration value at a time.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>FieldStatusEnum Enumeration, Record.Update Method, Recordset.Update
Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Type">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Type Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">datatype = field</span>.Type</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Type property indicates the datatype of the Field's Value
property.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>DataTypeEnum</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Type property is read-only unless it is for a new Field object
that has been appended to the Fields collection of a Record object,
of which it is only read/write after the Value property of the Field
object has already been specified and the data provider has added the
Field object to the data source (by using the Update method of the
Fields collection).</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>DataTypeEnum Enumeration, Field.Value Property, Fields.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.UnderlyingValue">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.UnderlyingValue Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">underlyingvalue = field</span>.UnderlyingValue</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The UnderlyingValue property returns the current value of the Field
object's Value property.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Variant</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The UnderlyingValue property returns the value -- from the current
record -- of the associated Field object. This value may differ
from the OriginalValue property as it shows the value of a field for
the current transaction.</p>


<p>This is the same value that the Resync method uses to replace the
value of the Value property.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.OriginalValue, Field.Value Property, Recordset.Resync Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Field.Value">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Field.Value Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">field</span>.Value = <span class="replaceable">value</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Value property indicates the value assigned to the current Field
object.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Variant</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Value property is used to read and set the value of the
associated Field object. The Value property supports long binary data
through ADO.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields Collection </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>Set <span class="replaceable">fields = record</span>.Fields<br>Set <span class="replaceable">fields = recordset</span>.Fields</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>See the Field object for more information and examples pertaining to
the Fields collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Applies To</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt>Recordset</dt>
<dd><p>Offers a particular view of a group of records from the associated
connection.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Objects</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt>Field </dt>
<dd><p>Contains information about a single field in the current record of an
open Recordset object.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Methods</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt>Append</dt>
<dd><p>Adds a new Field object to the collection.</p></dd>

</dl>


<dl>
<dt>CancelUpdate</dt>
<dd><p>Cancels any pending changes to the individual Field objects of the
Record object's Fields collection.</p></dd>

</dl>


<dl>
<dt>Delete</dt>
<dd><p>Removes a Field object from the current Fields collection.</p></dd>

</dl>


<dl>
<dt>Refresh</dt>
<dd><p>Does not perform any visible function according to the Microsoft
documentation.</p></dd>

</dl>


<dl>
<dt>Resync</dt>
<dd><p>Updates the current collection based upon the underlying database.</p></dd>

</dl>


<dl>
<dt>Update</dt>
<dd><p>Persists any changes made to the current Fields collection of a
Record object.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Properties</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt>Count</dt>
<dd><p>Indicates how many Field objects belong to the associated Fields
collection.</p></dd>

</dl>


<dl>
<dt>Item</dt>
<dd><p>Accesses a particular Field object belonging to the Fields collection.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Append">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Append Method </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">fields</span>.Append <span class="replaceable">Name, Type, DefinedSize, Attrib, FieldValue</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Append method adds a new Field object to the collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Arguments</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt><span class="replaceable">Name</span> (String)</dt>
<dd><p>Represents the name of the field to append to the Fields collection.
This name must not already exist within the collection.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Type</span> (DataTypeEnum)</dt>
<dd><p>Specifies the datatype of the Field's Value property. The
default value for this parameter is <span class="LITERAL">adEmpty</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">DefinedSize</span> (String)</dt>
<dd><p>Optional. Dictates the length of the value stored within the Field
object. The value of this parameter is derived from the Type
property.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Attrib</span> (FieldAttributeEnum)</dt>
<dd><p>Optional. Specifies additional information regarding the new Field
object. The default value for this parameter is
<span class="LITERAL">adFldDefault</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">FieldValue</span> (Variant)</dt>
<dd><p>Optional. Gives the new Field object a value. The default for this
parameter is <span class="LITERAL">Null</span>. This parameter is valid only
when adding a Field object to a Record object's Fields
collection, not a Recordset object's.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The following datatypes are not supported by ADO and cannot be used
when adding new Field objects to the collection class: adIDispatch,
adIUnknown, and adVariant.</p>


<p>The following datatypes cannot be added to the Field's
collection and will generate an error: adArray, adChapter, adEmpty,
adPropVariant, and adUserDefined.</p>


<p>When using the Append method with a Fields collection of a Recordset
object, you cannot use the FieldValue parameter. Instead, you must
add the Field objects while the Recordset object is closed and then
assign them values after it is opened.</p>


<p>When appending Field objects to the Fields collection of a Record
object, you must first set the Field.Value property and call the
Update method before accessing any other Field properties such as
Type.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>DataTypeEnum Enumeration, FieldAttributeEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.CancelUpdate">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.CancelUpdate Method </td>
<td class="COMPATIBILITY">(Versions 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">record.Fields</span>.CancelUpdate</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CancelUpdate method cancels any pending changes to the individual
Field objects of the Record object's Fields collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>After calling the CancelUpdate method, all of the Field Objects will
have a status of <span class="LITERAL">adFieldOK</span>.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Record Object</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Count">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Count Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">count = fields</span>.Count</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Count property indicates how many Field objects belong to the
associated Fields collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Long</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>If the value of the Count property is zero, there are no Field
objects within the associated Fields collection. However, Field
objects that do belong to the associated Fields collection are
indexed from <span class="LITERAL">0</span> to one less than the value of the
Count property.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Delete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Delete Method </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">Fields</span>.Delete <span class="replaceable">Field</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Delete method removes a Field object from the current Fields
collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Arguments</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt><span class="replaceable">Field</span></dt>
<dd><p>Either the name of a valid Field object within the current
Field's collection or the ordinal position of a Field object
within the collection to be removed.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>You can call the Field.Delete method only on a closed Recordset
object.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Item">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Item Property </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br>Set <span class="replaceable">field = fields</span>.Item(Index)<br>Set <span class="replaceable">field = fields</span>(Index)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Item property accesses a particular Field object belonging to the
Fields collection.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Datatype</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Object</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Index placeholder represents a Variant datatype that represents
the ordinal position of a Field object within the Fields collection.
If the Fields collection does not contain the item requested, an
error is generated.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Note</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Some languages do not support the Item property in its first syntax.
For these languages, use the second syntax, without the Item method
name.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Refresh">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Refresh Method </td>
<td class="COMPATIBILITY">(Versions 2.0, 2.1, 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">Fields</span>.Refresh</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Refresh method does not perform any visible function according to
the Microsoft documentation.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>In order to update the Fields collection with changes from the
underlying database, use the Resync method or the MoveFirst method if
the Recordset object doesn't support bookmarks.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Recordset.MoveFirst Method, Recordset.Resync Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Resync">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Resync Method </td>
<td class="COMPATIBILITY">(Versions 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">record.Fields</span>.Resync <span class="replaceable">ResyncValues</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Resync method updates the current collection based upon the
underlying database.</p>

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Arguments</td>
</tr>
<tr>
<td colspan="2" class="description">


<dl>
<dt><span class="replaceable">ResyncValues</span> (ResyncEnum)</dt>
<dd><p>Optional. Specifies whether the underlying values within the Fields
collection are overwritten. The default value for this parameter is
<span class="LITERAL">adResyncAllValues</span>.</p></dd>

</dl>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Resync method resynchronizes the Field objects of a Record
object's Fields collection with those within the underlying
database.</p>


<p>The default value for the only parameter to this method,
<span class="LITERAL">adResyncAllValues</span> synchronizes all of the values
within the UnderlyingValue, Value, and OriginalValue properties.</p>


<p>If a Field object within the collection has a Status property equal
to either <span class="LITERAL">adFieldPendingUnknown</span> or
<span class="LITERAL">adFieldPendingInsert</span>, then the Resync method is
ignored for those Field objects.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">See Also</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>Field.OriginalValue Property, Field.Status Property,
Field.UnderlyingValue Property, Field.Value Property, ResyncEnum
Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Fields.Update">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Fields.Update Method </td>
<td class="COMPATIBILITY">(Versions 2.5, 2.6)</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td class="usage" colspan="2"><br><span class="replaceable">record.Fields</span>.Update</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">

</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Description</td>
</tr>
<tr>
<td colspan="2" class="description">


<p>The Update method persists any pending changes to the current Fields
collection of a Record object.</p>


<span class="PROGRAMLISTING"><pre>Dim parameter As ADODB.Parameter</pre></span>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
</body>
</html>