<html>
<head>
<title>Recordset 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">Recordset 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">recordset</span> As ADODB.Recordset</synopsis>


<p>The Recordset object represents a complete group of rows within a
table or a group of records that have been returned from an executed
command.</p>

</td></tr>
</table>
</div>
<div id="Recordset.AbsolutePage">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.AbsolutePage 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">absolutepage</span> = <span class="replaceable">recordset</span>.AbsolutePage</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The AbsolutePage property returns or sets a value that indicates the
current page in the recordset.</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>By setting the AbsolutePage property, you are instructing ADO to move
the record pointer to the first record within the page that you
specified. The AbsolutePage property can be set from
<span class="LITERAL">1</span> to the number returned by the PageCount
property, which is the total number of logical pages. The size of
each page is determined by the PageSize property.</p>


<p>By reading the AbsolutePage property, you can determine in which
logical page the record pointer is located. The AbsolutePage property
can return a Long value indicating the current page or a PositionEnum
value.</p>


<p>If when reading the AbsolutePage property, the record pointer is
pointing to the BOF marker, then the value
<span class="LITERAL">adPosBOF</span> (-2) is returned. If the record pointer
is at the EOF marker, then the <span class="LITERAL">adPosEOF</span> (-3) value
is returned. If the recordset is empty, if the record pointer's
position is unknown or if the data provider does not support the
AbsolutePage property, then the value <span class="LITERAL">adPosUnknown</span>
(-1) is returned.</p>


<p>The AbsolutePage property is 1-based, meaning that a value of 1
indicates the first page in the recordset.</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>Not all providers support the AbsolutePage 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>CursorOptionEnum Enumeration, PositionEnum Enumeration,
Recordset.Count Property, Recordset.Filter Property,
Recordset.PageSize Property, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.AbsolutePosition">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.AbsolutePosition 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>absoluteposition = recordset.AbsolutePosition</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The AbsolutePosition property returns or sets a value that indicates
the current record position within the recordset.</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>By setting the AbsolutePosition property, you are instructing ADO to
move to the record with the ordinal position that you specified. The
AbsolutePosition property can be set from 1 to the number returned by
the RecordCount property, which is the total number of records in the
recordset.</p>


<p>When you set the AbsolutePosition property, ADO reloads the cache
with a new set of records, the first one of which is the record that
you specify. The number of records that are loaded in the cache is
determined by the CacheSize property.</p>


<p>By reading the AbsolutePosition property, you can determine at which
ordinal position the record pointer is located by the Long or the
PositionEnum value.</p>


<p>If, when reading the AbsolutePosition property, the record pointer is
pointing to the BOF marker, then the value
<span class="LITERAL">adPosBOF</span> (-2) is returned. If the record pointer
is at the EOF marker, then the <span class="LITERAL">adPosEOF</span> (-3) value
is returned. If the recordset is empty, if the record pointer's
position is unknown, or if the data provider does not support the
AbsolutePosition property, then the value
<span class="LITERAL">adPosUnknown</span> (-1) is returned.</p>


<p>It is important to note that the AbsolutePosition can change in the
event that a previous record is deleted or even if the recordset is
required. I recommend using bookmarks to keep track of records by
position.</p>


<p>The AbsolutePosition property is 1-based, meaning that the value 1
indicates the first record in the recordset.</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>Not all providers support the AbsolutePosition 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>CursorOptionEnum Enumeration, PositionEnum Enumeration,
Recordset.CacheSize Property, Recordset.RecordCount Property,
Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.ActiveCommand">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.ActiveCommand 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">activecommand = recordset</span>.ActiveCommand</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The ActiveCommand property returns the Command object that was used
to populate a Recordset object.</p>

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


<p>Variant (containing a Command 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 read-only ActiveCommand property is used to return the Command
object that was used to populate a Recordset object.</p>


<p>If a Command object was not used to populate a Recordset object, a
reference to a <span class="LITERAL">Null</span> object is returned.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.ActiveConnection">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.ActiveConnection 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">recordset</span>.ActiveConnection = <span class="replaceable">connection</span><br>recordset.ActiveConnection = connenctionstring</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The ActiveConnection property specifies the Connection object for the
current Recordset object.</p>

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


<p>String or a Variant (containing the current Connection 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 ActiveConnection property can be read to return either a String
or a reference to a Connection object. The ActiveConnection property
cannot be read if the Recordset object is open or if the Recordset
object was created with a Command object (its Source property set to
a Command object). At any other time, the ActiveConnection property
can be set to either a String or a reference to a Connection object.
If a String value is used, then it should be a valid connection
string that could be passed to the ConnectionString property of a
Connection object. You must set the ActiveConnection property before
you attempt to open a Recordset object. Before it is set, the default
value for the ActiveConnection property is a <span class="LITERAL">Null</span>
object reference.</p>


<p>If you specify the ActiveConnection as a parameter to the Open method
of the Recordset object, the ActiveConnection property will access
the same value. If you opened a Recordset object with a Command
object as the Source property value, the Recordset object's
ActiveConnection property will access the Command object's
ActiveConnection property value.</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>Conection.ConnectionString Property, Recordset.Open Method,
Recordset.Source Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.AddNew">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.AddNew 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">recordset</span>.AddNew <span class="replaceable">Fields, Values</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The AddNew method creates a new record within the current Recordset
object that is set to the value that you specify.</p>

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


<dl>
<dt><span class="replaceable">Fields</span></dt>
<dd><p>As the optional first parameter to the AddNew method, supply either a
Variant or a Variant array. This object represents the name of the
field or an array of fields, respectively, for which you wish to
initialize values. If this parameter is a Variant array, then the
next parameter, <span class="replaceable">Values</span>, must also be a
Variant array of the same dimension.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Values</span></dt>
<dd><p>The optional second parameter works in correspondence with the first
parameter, <span class="replaceable">Fields</span>. This parameter is also
either a Variant or a Variant array that specifies the values of the
fields that you included in your first parameter. It is important to
remember that if this parameter contains a Variant array, then the
Fields parameter must also be an array of the same dimension. In
addition, each ordinal position of both arrays must match the proper
fields to the correct values.</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 AddNew method is a member method of the Recordset object. Its
purpose is to add a new record to the recordset specified by the
Recordset object. With the AddNew method, you may choose to include
either a single field name and initialization value or a list of
fields, in the form of a Variant array, along with a corresponding
Variant array of values, which match these fields.</p>


<p>After calling the AddNew method, you can call either the Update
method or the AddNew method again to add the current record to the
Recordset object. If you call the AddNew method before calling the
Update method, then ADO automatically calls the Update method and
proceeds with the AddNew method call. Simply adding the record to the
Recordset object does not guarantee that your new record is in your
data source. This case depends on the updating mode of your Recordset
object.</p>


<p>If the Recordset object is set for immediate update mode and you do
not include parameters with the AddNew call, then your changes are
made immediately after the following Update or AddNew method call. If
you call AddNew with parameters, the values are cached locally until
the next Update is called. During the period between the AddNew and
Update method calls, the EditMode property is set to
<span class="LITERAL">adEditAdd</span> and is not reset to
<span class="LITERAL">adEditNone</span> until the update is completed, either
by calling the Update method or AddNew once again.</p>


<p>If the Recordset object is set for batch update mode, your changes
are made only when the UpdateBatch method of the Recordset object is
called. In this mode, the changes are cached locally if the AddNew
method does not include parameters. This also sets the EditMode
property to <span class="LITERAL">adEditAdd</span>. The changes are sent to the
provider -- but still not posted to the data source -- when the
Update method is called, in turn setting the EditMode property to
<span class="LITERAL">adEditNone</span>. On the other hand, if you call the
AddNew method with parameters, the changes are immediately sent to
the provider to be posted with the next UpdateBatch method call.</p>


<p>If your Recordset object supports bookmarks, your new record will be
added to the end of your recordset and can be accessed at any time.
If your Recordset object does not support bookmarks, there is a good
chance that you may not be able to access the record once you move
away from it, so never rely on it being there. Instead, use the
Requery method of the Recordset object to enable your application to
find the field.</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>EditModeEnum Enumeration, Recordset.EditMode Property,
Recordset.Requery Method, Recordset.Update Method,
Recordset.UpdateBatch Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.BOF">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.BOF Property/Recordset.EOF 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">Boolean = recordset</span>.BOF<br><span class="replaceable">Boolean = recordset</span>.EOF</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The BOF property indicates that the record pointer is located before
the first record in the recordset. The EOF property indicates that
the record pointer is located directly after the last record in the
recordset.</p>

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


<p>Boolean</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 BOF and EOF properties are both read-only.</p>


<p>If both the BOF and EOF properties are <span class="LITERAL">True</span>, then
the current recordset is empty. Using any Move method (Move,
MovePrevious, MoveFirst, MoveNext, or MovePrevious) generates an
error.</p>


<p>If both the BOF and EOF properties are <span class="LITERAL">False</span>, then
the record pointer can be pointing to any record within the
recordset. If this is the case, you can use any of the Move methods
without generating an error.</p>


<p>If the BOF property is <span class="LITERAL">True</span> and the EOF property
is <span class="LITERAL">False</span>, then the record pointer is pointing to
the position directly before the first record within the recordset.
When this happens, you cannot use the MovePrevious method or the Move
method with a negative number without generating an error.</p>


<p>If the EOF property is <span class="LITERAL">True</span> and the BOF property
is <span class="LITERAL">False</span>, then the record pointer is pointing to
the position directly after the last record within the recordset.
When this happens, you cannot use the MoveFirst method or the Move
method with a positive number without generating an error.</p>


<p>If you delete the last record in the recordset, the BOF and EOF
properties will remain set to <span class="LITERAL">False</span> until you move
the record pointer.</p>


<p>If either a call to MoveFirst or a call to MoveLast results in not
being able to find a record, both the EOF and BOF properties will be
set to <span class="LITERAL">True</span>.</p>


<p>If MovePrevious or Move -- with a value of less than
zero -- cannot find a record, the BOF property is set to
<span class="LITERAL">True</span>.</p>


<p>If MoveNext or Move -- with a value of greater than
zero -- cannot find a record, the EOF property is set to
<span class="LITERAL">True</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>Recordset.Move Method, Recordset.MoveFirst Method, Recordset.MoveLast
Method, Recordset.MoveNext Method, Recordset.MovePrevious Method,
Recordset.Open Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Bookmark">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Bookmark 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">bookmark = recordset</span>.Bookmark</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Bookmark property returns a unique identifier for the current
record within a recordset. By setting the Bookmark property to a
previously read value, the record pointer can be repositioned to the
original record.</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 Bookmark property is available only through recordsets that
support bookmarks. Bookmarks are used to record the position of the
current record and later to set the current record back to the
specified bookmark.</p>


<p>Bookmarks can be used interchangeably within Recordset objects that
are clones of each other, but not with other Recordset objects, even
if they were created from the same source.</p>


<p>The return value of the Bookmark property is not readable and
shouldn't be used in comparisons because two bookmarks of the
same record may not be the same.</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>Not all recordsets support the Bookmark 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>CursorOptionEnum Enumeration, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CacheSize">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CacheSize 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">recordset</span>.CacheSize = <span class="replaceable">cachesize</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CacheSize property indicates the number or records that are
cached by ADO locally in system memory.</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 CacheSize property sets or reads the number of records that are
kept in local memory at one time by ADO. The value of CacheSize must
be at least 1, otherwise an error will occur. The default value of
the CacheSize property is 1.</p>


<p>When a recordset is first opened, the number of records specified by
the CacheSize property is gathered. After the record pointer moves
beyond this number, another set of records is returned, the first
being the next record in the recordset. If fewer records are
available, the CacheSize requests only those records that are
gathered.</p>


<p>The CacheSize property can be changed throughout the life of a
recordset; however, the number of records retrieved into the cache
does not change until the record pointer is moved outside the current
cache.</p>


<p>The values within the cache do not reflect changes made by other
users. To accomplish this, use the Resync method.</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.Resync Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Cancel">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Cancel 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>recordset.Cancel</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Cancel method cancels an asynchronous operation for the Recordset
object.</p>

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


<p>The Cancel method can be called to cancel an asynchronous operation
of the Recordset object invoked by the Open method.</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.Open Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CancelBatch">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CancelBatch 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">recordset</span>.CancelBatch <span class="replaceable">AffectRecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CancelBatch method cancels the currently pending batch update for
the current Recordset object.</p>

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


<dl>
<dt><span class="replaceable">AffectRecords</span> (AffectEnum)</dt>
<dd><p>Optional. Enumerator with the value of
<span class="LITERAL">adAffectCurrent</span>, <span class="LITERAL">adAffectGroup</span>,
or <span class="LITERAL">adAffectAll</span>.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectCurrent</span>, the CancelBatch method call
affects only the pending updates for the current record of the
recordset.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectGroup</span>, the CancelBatch method call affects
only the pending records that are dictated through the Filter
property of the current Recordset object. This property must be
already set for the CancelBatch method to be called with the
<span class="replaceable">adAffectGroup</span> parameter.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectAll</span>, all records pending updates within
the current Recordset object (including those hidden by the Filter
property) are affected by the CancelBatch method.</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>With the CancelBatch method, you can cancel any or all pending
updates in the current Recordset object from batch update mode;
however, in immediate update mode, calling this method will generate
an error.</p>


<p>The CancelUpdate method is called when the CancelBatch method is
called, thus removing any updates or new records that were added
within the batch. For this reason, the current record position may be
invalid, and it is suggested that you move to a reliable record
position, either by a valid bookmark or by using a method such as
MoveFirst.</p>


<p>If a runtime error occurs during the call to the CancelBatch method,
then there are conflicts with all of the records that were requested
from the current recordset. In addition, if only one or a few records
are in conflict, then the Errors collection is populated, but a
runtime error does not occur.</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>Not all providers support the CancelBatch 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>CursorOptionEnum Enumeration, Recordset.CancelUpdate Method,
Recordset.Filter Property, AffectEnum Enumeration, Recordset.Supports
Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CancelUpdate">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CancelUpdate 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">recordset</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 changes to the current batch
update made since the last AddNew or Update method calls.</p>

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


<p>The CancelUpdate method of the Recordset object cancels any changes
that were made to a record since a call to the Update method of that
Recordset. In addition, the CancelUpdate method cancels the creation
of a new record by the AddNew method.</p>


<p>The CancelUpdate method must be called before the Update method for
the current record. The only other way to cancel the changes to a
record is by using transaction management through the BeginTrans and
RollbackTrans methods of the 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>Recordset.AddNew Method, Recordset.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Clone">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Clone 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">cloned_recordset = original_recordset</span>.Clone</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Clone method of the Recordset object returns a clone of the
current Recordset.</p>

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


<p>Recordset 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 Clone method of the Recordset object creates an exact multiple
copy of the original Recordset object. Use this method when you want
to access more than one record at a time within the same recordset.
This is more efficient than creating another new Recordset object for
the same recordset.</p>


<p>When a clone is created, the clone's record position will be
set to the first record in the recordset.</p>


<p>Only recordsets that support bookmarks can be cloned. Bookmarks from
one recordset are valid for clones of that recordset, and vice versa.
Closing a clone does not close the original recordset, and vice
versa.</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>LockTypeEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Close">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Close 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">recordset</span>.Close</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Close method closes a Recordset object.</p>

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


<p>The Close method closes either a Connection or a Recordset object.
When you invoke this method on either object, all dependant objects
of your connection or recordset are also closed. You would use the
Close method to free system resources although the resource still
remains in memory. After closing a Connection or Recordset object,
you can still open it again. To completely remove the object from
memory, set it to <span class="LITERAL">Nothing</span>.</p>


<p>When calling the Close method of the Connection object, all
associated Recordset objects will be closed, but the associated
Command object will persist, thus setting the ActiveConnection
property to <span class="LITERAL">Nothing</span> and clearning the Parameters
collection of the Command object. You can still use the Open method
to connect to a data source.</p>


<p>If you close a Connection object that has any associated open
Recordset objects, any pending changes of the Recordset objects will
be rolled back. By calling the Close method of the Connection object
while a transaction is in progress, you generate an error. If a
Connection object falls out of scope while a transaction is in
progress, the transaction is automatically rolled back.</p>


<p>When you use the Close method on the Recordset object, that object
releases any exclusive access you may have to the data and releases
any associated data. You can still use the Open method of that
Recordset object later, after the Close method.</p>


<p>If your data source is in immediate update mode and the Close method
is called while editing, an error occurs. To avoid this error, call
either the Update method or the CancelUpdate method. If you are in
batch update mode, the data since the last UpdateBatch will be lost.</p>


<p>If you have cloned a Recordset object whose Close method you called,
the cloned Recordset object will not be closed, and vice versa.</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.ActiveConnection Property, Recordset.CancelUpdate Method,
Recordset.Open Method, Recordset.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CompareBookmarks">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CompareBookmarks 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">result = recordset</span>.CopmareBookmarks (<span class="replaceable">Bookmark1, Bookmark2</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CompareBookmarks method determines the position of two bookmarks
in a recordset relative to one another.</p>

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


<dl>
<dt><span class="replaceable">Bookmark1</span> (Variant)</dt>
<dd><p>A bookmark of the first row to be compared.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Bookmark2</span> (Variant)</dt>
<dd><p>A bookmark of the second row to be compared.</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>CompareEnum</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 CompareBookmark method returns a value that indicates which of
the two passed bookmarks come first in ordinal position. Bookmarks
are unique to rows within the same Recordset and clones of a
Recordset object. Comparing bookmarks from two different Recordsets
(not created by cloning another) will not return reliable results.</p>


<p>Obtain the current row's bookmark by reading the Bookmark
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>CompareEnum Enumeration, Recordset.Bookmark Property, Recordset.Clone
Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CursorLocation">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CursorLocation 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">recordset</span>.CursorLocation = <span class="replaceable">cursorlocation</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CursorLocation property indicates the location of the cursor
service.</p>

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


<p>CursorLocationEnum (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 value of the CursorLocation property can be set to one of the
valid CursorLocationEnum values listed in <link linkend="ado-APP-E">Appendix E</link>.</p>


<p>The value of the CursorLocation property is read- and write-enabled
for closed Recordset objects and read-only for open Recordset
objects.</p>


<p>A recordset returned from an Execute method inherits the value for
the CursorLocation from the original object. Recordset objects
automatically inherit this value from the Connection object that
established it.</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>Command.Object Method, Connection.Execute Method, CursorLocationEnum
Enumeration, Recordset.Open Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.CursorType">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.CursorType 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">recordset</span>.CursorLocation = <span class="replaceable">cursorlocation</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The CursorType property indicates the type of cursor to be used for
the current recordset.</p>

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


<p>CursorTypeEnum (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 CursorType property indicates the type of cursor that should be
used when the Recordset object is opened. The value of this property
is read- and write-enabled when the Recordset object is closed and
read-only when it is opened. The value of the CursorType property can
be one of the CursorType enumerations listed in <link linkend="ado-APP-E">Appendix E</link>.</p>


<p>If the current data provider does not support the selected cursor
type, the value of the CursorType property changes when the Recordset
object is opened. This value can be read by the application if need
be. In this case, once the Recordset object is closed, the original
selected value will be returned to the CursorType property.</p>


<p>You can use the Supports method of the Recordset object to see what
functionality is supported by the chosen cursor type. (See <link linkend="ado-CHP-5">Chapter 5</link> for more information on cursor types.)</p>


<p>The Dynamic cursor supports the adMovePrevious functionality as
described by the Supports method. The Forward Only cursor does not
support any of the functionality that the Supports method indicates.
The Keyset cursor and the Static cursor support adBookmark,
adHoldRecords, adMovePrevious, and adResync functionality as
described by the Supports method.</p>


<p>The Forward Only cursor type does not support bookmarks, because you
do not have the functionality to move back to a bookmarked record.
The Keyset and Static cursor records support bookmarks through ADO,
and the Dynamic cursor supports bookmarks through the data provider
(if it supports them).</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>If the CursorLocation property has been set to
<span class="LITERAL">adUseClient</span>, only the
<span class="LITERAL">adOpenStatic</span> CursorType value can be 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>Connection.CursorLocation Property, CursorTypeEnum Enumeration,
Recordset.CursorLocation Property, Recordset.Open Method,
Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.DataMember">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.DataMember Property</td>
<td class="COMPATIBILITY">RDM Property(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">recordset</span>.DataMember = <span class="replaceable">datamember</span><br><span class="replaceable">recordset</span>.DataSource = <span class="replaceable">datasource</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The DataMember property indicates the object, within the data source
specified by the Data Source property, that the Recordset object
should be created with.</p>

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


<simplelist>

<member>String (DataMember property)</member>

<member>DataSource (DataSource property)</member>

</simplelist>


</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 DataMember and DataSource properties are always used together.</p>


<p>The DataSource property indicates the data source in which the object
specified by DataMember resides.</p>


<p>The DataMember property indicates which object within the data source
should be used to create the Recordset object.</p>


<p>The Recordset must be closed when the DataMember property is being
set. In addition, an error will be raised if the DataSource property
is set before the DataMember property.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Delete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.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">recordset</span>.Delete <span class="replaceable">AffectRecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Delete method deletes specified records within the recordset.</p>

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


<dl>
<dt><span class="replaceable">AffectRecords</span> (Affect Enum)</dt>
<dd><p>Optional. Indicates either the value of
<span class="LITERAL">adAffectCurrent</span> or
<span class="LITERAL">adAffectGroup</span>.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectCurrent</span>, the CancelBatch method call
affects only the pending updates for the current record of the
recordset.</p>


<p>If the value of AffectRecords is <span class="LITERAL">adAffectGroup</span>,
the CancelBatch method call affects only the pending records that are
dictated through the Filter property of the current Recordset object.
This property must be already set for the CancelBatch method to be
called with the <span class="replaceable">adAffectGroup</span> parameter.</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 Delete method removes a record or a group of records when used
with the Recordset object. The Delete method removes a specified
Parameter object from the Parameters collection when used with it.</p>


<p>When using the Delete method with the Recordset object, records that
are to be deleted are actually marked for deletion. If the particular
recordset does not allow deletion, an error occurs. In immediate
update mode, the deletion occurs immediately. However, in batch
update mode, the records are marked deleted and are cached until the
UpdateBatch method is called. You can view the deleted records by
using the Filter property.</p>


<p>After you delete a record, the current record position is still on
that record. Once you move from that record position, the records are
no longer accessible, and attempting to read a deleted record results
in an error. If you are using transaction management with BeginTrans,
you can cancel the deletion of records with the RollbackTrans method.
In addition, in batch update mode, you can cancel deletion by using
the CancelBatch method.</p>


<p>If you attempt to delete a record that has already been deleted by
another user, a runtime error does not occur; instead, the Errors
collection is populated with warnings. A runtime error occurs only if
all of the requested records to be deleted have a conflict for some
reason. You can use the Filter property with the
<span class="LITERAL">adFilterAffectedRecords</span> value and the Status
property to locate any records with conflicts.</p>


<p>The Delete method is valid only for the Parameters collection of the
Command object. Specify the name of the parameter to be deleted from
the collection in the form of a String.</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>Not all providers support the Delete method.</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>AffectEnum Enumeration, Connection.RollbackTrans Method,
CursorOptionEnum Enumeration, Recordset.CancelBatch Method,
Recordset.Filter Property, Recordset.Status Property,
Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.EditMode">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.EditMode 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">recordset</span>.EditMode = <span class="replaceable">editmode</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The EditMode property indicates the current editing status for a
given record.</p>

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


<p>EditModeEnum (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>Use the EditMode property to determine whether the current record is
being edited when an editing process has been interrupted. With this
information, you can determine whether you need to call the Update
method or the CancelUpdate method.</p>


<p>The value of the EditMode property can be one of the EditModeEnum
enumerations listed in <link linkend="ado-APP-E">Appendix E</link>.</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>EditModeEnum Enumeration, Recordset.AddNew Method,
Recordset.CancelUpdate Method, Recordset.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.EndOfRecordset">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.EndOfRecordset Event </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>EndOfRecordset(<span class="replaceable">fMoreData</span> As Boolean, _<br>               <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>               ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The EndOfRecordset event is called when an attempt to move the record
pointer past the end of the recordset has occurred.</p>

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


<dl>
<dt><span class="replaceable">fMoreData</span></dt>
<dd><p>A VARIANT_BOOL value that can be set to <span class="LITERAL">True</span> if
more data was added by the application to invalidate the current
event. In other words, when this event is fired, it is an indication
that the record pointer has gone outside the recordset. At this time,
you can append more records to the recordset and set this
<span class="replaceable">fMoreData</span> parameter to
<span class="LITERAL">True</span>, so that the operation can be attempted
again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span></dt>
<dd><p>An EventStatusEnum value indicating the status of the current
operation. The <span class="replaceable">adStatus</span> parameter is set
to <span class="LITERAL">adStatusOK</span> if the operation causing this event
was successful. If the <span class="replaceable">adStatus</span> parameter
is set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot
request that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>The Recordset object that fired this event.</p></dd>

</dl>


</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>EventStatusEnum Enumeration, Recordset.MoveNext Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.EOF">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.EOF 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">&nbsp;</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">
<p>See Recordset.BOF Property.</p></td>
</tr>
</table>
</div>
<div id="Recordset.FetchComplete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.FetchComplete Event </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>FetchComplete(ByVal <span class="replaceable">pError</span> As ADODB.Error, _<br>              <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>              ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The FetchComplete event is called when a long asynchronous operation
(fetch) has completed and all of the records have been returned.</p>

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


<dl>
<dt><span class="replaceable">pError</span></dt>
<dd><p>An Error object containing details about an error that occurred if
the <span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span></dt>
<dd><p>An EventStatusEnum value indicating the status of the current
operation. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusOK</span> the operation was successful. If
the <span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>, the operation failed and
the <span class="replaceable">pError</span> object contains the details
regarding the error. By setting the
<span class="replaceable">adStatus</span> parameter to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>The Recordset object that fired this event.</p></dd>

</dl>


</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>EventStatusEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.FetchProgress">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.FetchProgress Event </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>FetchProgress(ByVal <span class="replaceable">Progress</span> As Long, _<br>              ByVal <span class="replaceable">MaxProgress</span> As Long, _<br>              <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>              ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The FetchProgress event is called during a long asynchronous
operation (fetch) to report the progress of the fetch.</p>

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


<dl>
<dt><span class="replaceable">Progress</span></dt>
<dd><p>A Long value that indicates the number of records that have been
retrieved so far by the operation.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">MaxProgress</span></dt>
<dd><p>A Long value that indicates the maximum number of records that are
expected to be retrieved.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span></dt>
<dd><p>An EventStatusEnum value indicating the status of the current
operation. The <span class="replaceable">adStatus</span> parameter is set
to <span class="LITERAL">adStatusOK</span> if the operation causing this event
was successful. If the <span class="replaceable">adStatus</span> parameter
is set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot
request that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>The Recordset object that fired this event.</p></dd>

</dl>


</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>EventStatusEnum Enumeration, Recordset.FetchProgress Event</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.FieldChangeComplete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.FieldChangeComplete Event </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>FieldChangeComplete(ByVal <span class="replaceable">cFields</span> As Long, _<br>                    ByVal<span class="replaceable"> Fields</span> As Variant, _<br>                    ByVal <span class="replaceable">pError</span> As ADODB.Error, _<br>                    <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                    ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The FetchChangeComplete event is called after an operation changes
one or more Field object values.</p>

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


<dl>
<dt><span class="replaceable">cFields</span> (Long)</dt>
<dd><p>Indicates the number of Field objects within the Fields parameter.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Fields</span> (Variant array)</dt>
<dd><p>Contains the Field objects that are waiting to be changed.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pError</span> (Error)</dt>
<dd><p>Contains details about an error that occurred if the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventStatusEnum)</dt>
<dd><p>Indicates the status of the current operation. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span>, the operation was successful. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>, the operation failed, and
the <span class="replaceable">pError</span> object contains the details
regarding the error. If the <span class="replaceable">adStatus</span>
parameter is set to <span class="LITERAL">adStatusCancel</span>, then the
operation has been canceled before completion by the application. If
the <span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventStatusEnum Enumeration, Recordset.WillChangeField Event,
Recordset.Value, Recordset.Update</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Fields">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.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>record.Fields</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Field collection contains multiple Field objects for the current
Recordset object, one for each column in the Recordset object.</p>

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


<p>Fields (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 Fields collection of a Recordset object can be populated before
opening a Recordset object by calling the Refresh method of the
Fields collection.</p>


<p>Field objects can be added to the collection either by calling the
Field.Append method or by referencing by name a Field object that is
not already part of the collection. Calling the Field.Update method
will add the field to the collection, if possible, within the data
source. Until this moment, the Field.Status property will return
<span class="LITERAL">adFieldPendingInsert</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>Field.Append Method, Field.Refresh Method, Field.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Filter">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Filter 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>recordset.CancelBatch AffectRecords</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Filter property filters a selection of records within the current
Recordset 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>When you set the Filter property, the cursor type is changed to the
current filtered recordset. In this case, the AbsolutePosition,
AbsolutePage, RecordCount, and PageCount properties are affected,
since the current record is changed to the first record that meets
the requirements dictated by the Filter property.</p>


<p>The Filter property can have one of three types of values:</p>


<ul><li><p>A set of clauses that are connected with the AND or OR keywords.</p></li></ul>
<ul><li><p>An array of bookmark values.</p></li></ul>
<ul><li><p>A FilterGroupEnum enumeration value.</p></li></ul>
<p>Clauses are similar to WHERE clauses in SQL statements. They consist
of a field name, an operator, and a value. Multiple clauses can be
grouped and joined together with the AND and OR keywords. The field
name in a clause has to be a valid field name within the current
recordset and if it contains spaces, it has to be placed in brackets
([First Name]). The operator within a clause can be any of the
following: <span class="LITERAL">&lt;</span>, <span class="LITERAL">&gt;</span>,
<span class="LITERAL">&lt;=</span>, <span class="LITERAL">&gt;=</span>,
<span class="LITERAL">&lt;&gt;</span>, <span class="LITERAL">=</span>, or
<span class="LITERAL">LIKE</span>. The value within a clause is similar to the
data within the field specified. Numbers can use decimal points,
dollar signs, and scientific notation. Dates are surrounded by pound
signs (<span class="LITERAL">#</span>) (<span class="LITERAL">#06/20/1973#</span>) and
strings are surrounded by single quotes (<span class="LITERAL">'Jason T.
Roff'</span>).</p>


<p>If you are using the LIKE keyword as an operator, only the asterisk
(*) and percent sign (%) can be used as wildcards, as long as one of
the two is at the end of the value (Jason* or *as*).</p>


<p>When setting the Filter property to an array of bookmarks, the
bookmarks must be unique -- pointing to different
records -- within the associated recordset.</p>


<p>When setting the Filter to a FilterGroupEnum enumeration value,
choose from one of the constants listed in <link linkend="ado-APP-E-TABLE-25">Table E-25</link>.</p>


<p>The Filter property can fail because of a record that has been
deleted by another user. In this case, a runtime error does not
occur. Instead, the Errors collection is populated with warnings. A
runtime error occurs only if all of the requested records to be
filtered have a conflict for some reason. You can use the Status
property to locate any records with conflicts.</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>AffectEnum Enumeration, FilterGroupEnum Enumeration,
Recordset.AbsolutePage Property, Recordset.AbsolutePosition Property,
Recordset.CancelBatch Method, Recordset.Delete Property,
Recordset.PageCount Property, Recordset.RecordCount Property,
Recordset.Resync Method, Recordset.UpdateBatch Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Find">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Find 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">recordset</span>.Find (<span class="replaceable">Criteria, SkipRows, SearchDirections, Start</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Find method moves the record pointer to a row within the current
recordset that matches the single-column search criteria specified.</p>

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


<dl>
<dt><span class="replaceable">Criteria</span> (String)</dt>
<dd><p>Specifies a single-column search criteria in the form of
<span class="LITERAL">'Column</span> <span class="LITERAL">Operator</span>
<span class="LITERAL">Value'</span>. The Column portion is a name of a column
in the Recordset object. The Operator can be <span class="LITERAL">&gt;</span>,
<span class="LITERAL">&lt;</span>, <span class="LITERAL">=</span>,
<span class="LITERAL">&gt;=</span>, <span class="LITERAL">&lt;=</span>,
<span class="LITERAL">&lt;&gt;</span>, or <span class="LITERAL">LIKE</span>. The value
can be written as a string, floating point number, or date. Strings
are deliminated with single strings or number signs
(<span class="LITERAL">#</span>) and dates are deliminated with number signs
(<span class="LITERAL">#</span>). When using the <span class="LITERAL">LIKE</span>
operator, asterisks (<span class="LITERAL">*</span>) can be used at the end or
both the beginning and the end of the value
('<span class="LITERAL">*jr*'</span>, <span class="LITERAL">'jr*'</span>). If the
asterisks is used at the beginning only, an error will occur.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">SkipRows</span> (Long)</dt>
<dd><p>Optional. Indicates how many rows to skip before searching the
recordset for a match to the <span class="replaceable">Criteria</span>
argument. The default is 0, meaning the search will begin on the
current row.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">SearchDirection</span> (SearchDirectionEnum)</dt>
<dd><p>Optional. Indicates whether to search forward or backward through the
recordset. If a match is not found and a forward search is being
done, the record pointer will point to the EOF marker. If a backward
search is done and a match is not found, the record pointer will
point to the BOF marker. By default, a forward search is done.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Start</span> (Variant)</dt>
<dd><p>Optional. Specifies a starting position for the search in the form of
a bookmark. The default value for this argument is the current row.</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>If a current record is not set prior to calling the Find method, an
error will occur. It is good practice to call the MoveFirst method
prior to the Find method.</p>


<p>The Find method works only with single-column search critierias.</p>


<p>Not all providers support Bookmarks and, therefore, cannot search
backwards. Use the Supports method to determine whether your current
data provider can support the Find operation that you want to use.</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>CursorOptionEnum Enumeration, Recordset.MoveFirst Method,
Recordset.Supports Method, SearchDirectionEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.GetRows">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.GetRows 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">record_array = recordset</span>.GetRows(<span class="replaceable">Rows, Start, Fields</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The GetRows method of the Recordset object returns multiple records
from an open Recordset object in the form of an array.</p>

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


<dl>
<dt><span class="replaceable">Rows</span> (Long)</dt>
<dd><p>Optional. Indicates the number of records to retrieve. The default
value for this argument is <span class="LITERAL">adGetRowsRest</span> (value of
-1).</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Start</span> (String or Variant)</dt>
<dd><p>Optional. Evaluates to a bookmark where the GetRows method should
begin.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Fields</span> (Variant)</dt>
<dd><p>Optional. Specifies which fields should be returned for each record
by the GetRows method. Represents a single field name, a single
field-ordinal number, an array of field names, or an array of
field-ordinal numbers.</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">


<simplelist>

<member>Variant (two-dimensional array)</member>

</simplelist>


</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 GetRows method of the Recordset object returns multiple records
from the same Recordset object into a two-dimensional array. The
records are returned in the form of a Variant array that is
automatically dimensioned by ADO. The first subscript is the field;
the second is the record number. The data returned is read-only.</p>


<p>You can specify the number of records to be returned through the
first argument. If this value is larger than the number of records,
only the remaining records are returned.</p>


<p>If the selected Recordset object supports bookmarks, you can specify
the starting location by passing the value of the record's
Bookmark property.</p>


<p>After the call to GetRows, the record pointer is set to the next
unread record, unless there is no more records, in which case the EOF
property is set to <span class="LITERAL">True</span>.</p>


<p>The last argument, <span class="replaceable">Fields</span>, can represent a
single field or a group of fields to be returned by the GetRows
method. This is done with a field name, a field-ordinal position, an
array of field names, or an array of field-ordinal positions.</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>Not all providers support the Find method.</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>BookmarkEnum Enumeration, CursorOptionEnum Enumeration,
GetRowsOptionEnum Enumeration, Recordset.Bookmark Property,
Recordset.EOF Property, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.GetString">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.GetString 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">Variant = recordset</span>.GetString(<span class="replaceable">StringFormat, NumRows, ColumnDelimiter</span>, _<br>                                  <span class="replaceable">RowDelimiter, NullExpr</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The GetString method returns the entire Recordset object as a String
value.</p>

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


<dl>
<dt><span class="replaceable">StringFormat</span> (StringFormatEnum)</dt>
<dd><p>Indicates the format of the returned Recordset in String form.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">NumRows</span></dt>
<dd><p>Optional. Indicates the number of rows to be converted to a String.
If the value of this parameter is either missing or greater than the
total number of records in the Recordset object, then all of the
records are converted.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">ColumnDelimeter</span></dt>
<dd><p>Optional. Used only when the <span class="replaceable">StringFormat</span>
parameter is set to <span class="LITERAL">adClipString</span>. Indicates the
delimeter used between columns. The tab character is the default
character.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">RowDelimeter</span></dt>
<dd><p>Optional. Used only when the <span class="replaceable">StringFormat</span>
parameter is set to <span class="LITERAL">adClipString</span>. Indicates the
delimeter used between rows. The carriage return character is the
default character.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">NullExpr</span></dt>
<dd><p>Optional. Used only when the <span class="replaceable">StringFormat</span>
parameter is set to <span class="LITERAL">adClipString</span>. Indicates the
String used to replace <span class="LITERAL">Null</span> characters. The
default for this parameter is the empty String.</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 GetString method converts the contents of the Recordset object to
a String value.</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>StringFormatEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Index">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Index Property </td>
<td class="COMPATIBILITY">(Versions 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>recordset.Index = index</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Index property sets the current index for a given recordset.</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 Index property is both read- and write-enabled. However, it
cannot be set within a WillRecordsetChange or RecordsetChangeComplete
event or during an asynchronous execution.</p>


<p>The Index property is used in conjunction with the Seek method to
take advantage of the underlying table's indexed structure (as
compared to the Find method, which operates sequentially).</p>


<p>The position of the record pointer may change when the Index is set
(changing the AbsolutePosition property value). In addition, the
following events occur: WillRecordsetChange, RecordsetChangeComplete,
WillMove, and MoveComplete.</p>


<p>If the LockType property is set to
<span class="LITERAL">adLockPessimistic</span> or
<span class="LITERAL">adLockOptimistic</span>, then the UpdateBatch method is
called releasing any filter that may be applied. In addition, the
record pointer is moved to the first record in the indexed recordset.</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>Not all providers support indexes; therefore, they do not all support
the Index 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>CursorOptionEnum Enumeration, Recordset.MoveComplete Event,
Recordset.RecordsetChangeComplete Event, Recordset.Seek Method,
Recordset.UpdateBatch Method, Recordset.WillMove Event,
Recordset.WillRecordsetChange Event, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.LockType">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.LockType 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">locktype = recordset</span>.LockType</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The LockType property indicates the type of locks that are set on
records when they are being edited.</p>

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


<p>LockTypeEnum (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 LockType property is read- and write-enabled when the Recordset
object is closed, but read-only once it is opened. The LockType
property may be any one of the values in <link linkend="ado-APP-E-TABLE-29">Table E-29</link>.</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>Not all data providers support every type of record locking. In this
case, the data provider may automatically select a different type of
lock type. Check the available functionality of a data provider with
the Supports 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>LockTypeEnum Enumeration, Recordset.Open Method, Recordset.Supports
Method, Recordset.Update Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.MarshalOptions">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.MarshalOptions 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">recordset</span>.MarshalOptions = <span class="replaceable">marshaloptions</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The MarshalOptions property indicates which records are to be
marshaled back to the server.</p>

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


<p>MarshalOptionsEnum (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 MarshalOptions property can be one of the MarshalOptionsEnum
enumeration values listed in <link linkend="ado-APP-E">Appendix E</link>.</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>MarshalOptionsEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.MaxRecords">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.MaxRecords 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">recordset</span>.MaxRecords = <span class="replaceable">maxrecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The MaxRecords property indicates the maximum number of records to be
returned to a recordset from a query.</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 MaxRecords property is read- and write-enabled when the Recordset
object is open, but read-only when it is closed. A value of 0
(default) indicates that all of the valid records will be returned
from a query.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Move">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Move 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">recordset</span>.Move <span class="replaceable">NumRecords, Start</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Move method of the Recordset object moves the position of the
record pointer within the specified Recordset object.</p>

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


<dl>
<dt><span class="replaceable">NumRecords</span> (Long)</dt>
<dd><p>Specifies the number of records you want the record pointer to move.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Start</span> (String or Variant)</dt>
<dd><p>Optional. Represents the bookmark from which you want the record
pointer to move.</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 Move method of the Recordset object moves the record pointer a
specified number of records. If the
<span class="replaceable">NumRecords</span> argument is less than zero, the
pointer is moved forward the desired number. If the
<span class="replaceable">NumRecords</span> argument is greater than zero,
the record pointer is moved forward the desired number of records.</p>


<p>If the current Recordset object supports bookmarks, then you can
indicate a beginning position to start moving from with the Start
argument. The Start argument should be set to a valid bookmark within
the current Recordset object, and the record pointer will be moved
the desired number of records from that point. If no bookmark is
used, the record pointer will move from the current record.</p>


<p>Attempting to move to a point before the first record will result in
moving to the record before the first record, which is a BOF.
Attempting to move past the last record will result in the record
pointer moving to the record after the last record, which is the EOF.
In either case, if the Move method is used to attempt to move past
the BOF or EOF, an error is generated.</p>


<p>If the CacheSize property is set to cache records locally from the
data provider and you pass a NumRecords that ventures outside of the
cache, ADO is forced to retrieve a new group of records from the data
provider. The number of records received is dependent upon the
CacheSize property. This also happens if you are using a local cache
and use the Start argument. The first record to be received, in this
case, would be the desired destination record.</p>


<p>Even if the Recordset object is forward-only, you can still pass a
NumRecords value that is less than zero, as long as the destination
record is within the current cache. If it is before the current
cache, 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>Not all providers support the Move method.</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>BookmarkEnum Enumeration, Recordset.Bookmark Property,
Recordset.CacheSize Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.MoveComplete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.MoveComplete Event </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>MoveComplete(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>             ByVal <span class="replaceable">pError</span> As ADODB.Error, _<br>             <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>             ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The MoveComplete event is called after an operation changes the
position of the record pointer within the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventReasonEnum)</dt>
<dd><p>Indicates the reason for this event. Proper values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnMoveFirst</span>, <span class="LITERAL">adRsnMoveLast</span>,
<span class="LITERAL">adRsnMoveNext</span>,
<span class="LITERAL">adRsnMovePrevious</span>, <span class="LITERAL">adRsnMove</span>,
and <span class="LITERAL">adRsnRequery</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pError</span> (Error)</dt>
<dd><p>Contains details about an error that occurred if the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventStatusEnum)</dt>
<dd><p>Indicates the status of the current operation. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span>, the operation was successful. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>, the operation failed, and
the <span class="replaceable">pError</span> object contains the details
regarding the error. If the <span class="replaceable">adStatus</span>
parameter is set to <span class="LITERAL">adStatusCancel</span>, the operation
has been canceled before completion by the application. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
Recordset.AbsolutePage Property, Recordset.AbsolutePosition Property,
Recordset.AddNew Method, Recordset.Bookmark Method, Recordset.Filter
Property, Recordset.Index Property, Recordset.Open Method,
Recordset.Move Method, Recordset.MoveFirst Method, Recordset.MoveLast
Method, Recordset.MoveNext Method, Recordset.MovePrevious Method,
Recordset.Requery Method, Recordset.WillMove Event</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.MoveFirst">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.MoveFirst Method</td>
<td class="COMPATIBILITY">RMF Method(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">recordset</span>.MoveFirst<br><span class="replaceable">recordset</span>.MoveLast<br><span class="replaceable">recordset</span>.MoveNext<br><span class="replaceable">recordset</span>.MovePrevious</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The MoveFirst, MoveLast, MoveNext, and MovePrevious methods of the
Recordset object move the record pointer to the first, last, next,
and previous records, respectively, and make that record the current
record.</p>

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


<p>The MoveFirst, MoveLast, MoveNext, and MovePrevious methods of the
Recordset object allow you to move freely throughout the specified
open Recordset object.</p>


<p>The MoveFirst method moves to the first record in the recordset,
making it the current record.</p>


<p>The MoveLast method moves to the last record in the recordset, making
it the current record. This method requires the Recordset object to
support bookmarks. If it does not, an error is generated when
attempting to use the MoveLast method.</p>


<p>The MoveNext method moves to the next record in the recordset, making
it the current record. If the current record is the last record in
the recordset before the call to MoveNext, then the record pointer is
moved to the record after the last in the recordset and sets the EOF
property to <span class="LITERAL">True</span>. Attempting to move past the EOF
results in an error.</p>


<p>The MovePrevious method moves to the record directly before the
current record in the recordset. This record is then set to the
current record. This method requires that the recordset support
either bookmarks or backward cursor movement; otherwise, an error is
generated. If the current record -- before calling the
MovePrevious method -- is the first record in the recordset, the
record pointer is set to the record directly before the first record,
and the BOF property is set to <span class="LITERAL">True</span>. Attempting to
move before the beginning of the recordset results in an error.</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>Not all providers support the MoveFirst and MovePrevious methods.</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>CursorOptionEnum Enumeration, Recordset.BOF Property, Recordset.EOF
Property, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.NextRecordset">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.NextRecordset 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">resulting_recordset = recordset</span>.NextRecordset(<span class="replaceable">RecordsAffected</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The NextRecordset method of the Recordset object returns the next
recordset by advancing through a series of commands:</p>


<span class="PROGRAMLISTING"><pre>recordset.MoveFirst</pre></span>

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


<dl>
<dt><span class="replaceable">RecordsAffected</span> (Long)</dt>
<dd><p>Set to the number of records that the current operation affected. The
data provider does this.</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>Use the NextRecordset method of the Recordset object to obtain the
next recordset in a compound command statement or a stored procedure
that returns multiple results. An example of a compound command
statement is:</p>


<span class="PROGRAMLISTING"><pre>SELECT * FROM upstairs; SELECT * FROM downstairs</pre></span>


<p>The recordset that is originally created with either the Execute or
Open methods returns a Recordset object based only on the first SQL
statement in this compound statement. You must call NextRecordset to
obtain each additional recordset. If the Recordset object is closed
and there are remaining statements, those statements will never be
executed.</p>


<p>The NextRecordset method continues to return recordsets as long as
there are more in the list. If a row-returning statement successfully
executes, and the result is zero records, then the Recordset
object's EOF and BOF properties are both be set to
<span class="LITERAL">True</span>. If a non-row-returning statement
successfully executes, then the Recordset object should not be set to
<span class="LITERAL">Nothing</span>, but the EOF property should be
<span class="LITERAL">True</span>.</p>


<p>If there are no more statements in the compound command statement,
the returned Recordset object is set to <span class="LITERAL">Nothing</span>.</p>


<p>You must call the Update or the CancelUpdate methods before
requesting the next recordset if you are in immediate update mode and
editing. Otherwise, an error will be generated.</p>


<p>Parameters for compound command statements are passed like those of
regular statements; all parameters must be filled in the Parameters
collection in the proper order across statements. In addition, you
must read all the results of a recordset before reading output
parameter values.</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.Update Method, Recordset.CancelUpdate Method, Recordset.BOF
Property, Recordset.EOF Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Open">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Open 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>recordset.Open <span class="replaceable">Source, ActiveConnection, CursorType, LockType, Options</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Open method opens a cursor within a Recordset object.</p>

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


<dl>
<dt><span class="replaceable">Source</span> (Variant)</dt>
<dd><p>Optional. Indicates the actual data that is used to open the
Recordset object. This can be a Command object, a SQL statement, a
table name, a stored procedure, a URL, a filename, or a Stream object
that contains a previously persisted Recordset object.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">ActiveConnection</span> (Variant)</dt>
<dd><p>Optional. Specifies either an open Connection object or a connection
string to be used when the Recordset object creates its own
Connection object.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">CursorType</span> (CursorTypeEnum)</dt>
<dd><p>Optional. Indicates the type of cursor that is to be used when
opening the Recordset object. By default this value is
<span class="LITERAL">adLockReadOnly</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">LockType</span> (LockTypeEnum)</dt>
<dd><p>Optional. Specifies the locking to be used on the opened Recordset
object. The <span class="LITERAL">adLockReadOnly</span> enumeration value is
the default value for this argument.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Options</span> (Long -- CommandTypeEnum and ExecuteOptionEnum)</dt>
<dd><p>Optional. Specifies the type of data that is to be specified by the
Source argument; additionally, can indicate that the Recordset object
is to be opened asynchronously. The default value for the Options
argument if a Command object is not the source of the Recordset
object is <span class="LITERAL">adCmdFile</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 Source, ActiveConnection, CursorType, and LockType arguments have
matching properties within the Recordset object. If the arguments are
omitted in the Open method call, the individual values are obtained
from the corresponding properties. If a value is specified for a
given argument, however, it will overwrite the previous value stored
in the property value.</p>


<p>The source of a Recordset object can be one of the following:</p>


<ul><li><p>Command object</p></li></ul>
<ul><li><p>SQL statement</p></li></ul>
<ul><li><p>Stored procedure</p></li></ul>
<ul><li><p>Table name</p></li></ul>
<ul><li><p>URL</p></li></ul>
<ul><li><p>Filename</p></li></ul>
<ul><li><p>Stream object (with the contents of a previously persisted Recordset
object)</p></li></ul>
<p>If anything other than a Command object is used to open a Recordset,
specify the data source by using the Options argument. If you do not,
ADO must call the data provider repeatedly to determine the type of
data that it is opening.</p>


<p>When specifying a file as a Recordset object's source, you can
do so with a full pathname, a relative pathname, or even a URL value
(<systemitem role="url">http://www.domain.com</systemitem>).</p>


<p>The ActiveConnection argument is used only if you do not specify a
Command object. In fact, it is read-only if a valid Command object is
set to the Source property.</p>


<p>The ActiveConnection argument can be either an already opened
Connection object or a connection string, which will be used to open
a new Connection object for the Recordset object.</p>


<p>It is possible to change the value of the ActiveConnection property
after a Recordset object is opened, in order to send the updates to
the recordset to another data source. However, the remaining
arguments and their corresponding properties become read-only once
the Recordset object is opened.</p>


<p>You can also open a Recordset asynchronously by adding the
<span class="LITERAL">adAsyncFetch</span> enumeration value (from the
ExecuteOptionEnum enumeration).</p>


<p>Once the Recordset is opened if it is empty, both the BOF and the EOF
properties will be set <span class="LITERAL">True</span>. Close the Recordset
object by calling the Close method. This doesn't remove the
Recordset object from memory because you can reopen a Recordset
object. To remove the Recordset from memory, set the object to
<span class="LITERAL">Nothing</span>.</p>


<p>When opening a Recordset object with a Stream object, the Recordset
will automatically be opened synchronously regardless of the
ExecuteOptionEnum values specified. In addition, you should not
specify any other arguments to the Open method when opening a
Recordset object from a Stream 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>CommandTypeEnum Enumeration, CursorTypeEnum Enumeration,
ExecuteOptionEnum, LockTypeEnum Enumeration,
Recordset.ActiveConnection Property, Recordset.BOF Property,
Recordset.Close Method, Recordset.CursorType Property, Recordset.EOF
Property, Recordset.LockType Property, Recordset.Source Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.PageCount">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.PageCount 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">pagecount = recordset</span>.PageCount</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The PageCount property returns the number of logical pages that are
in the current Recordset 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 PageCount property returns a value indicating how many logical
pages of data are contained within the recordset. A page is
determined by the number of records in the recordset divided by the
number of records per page (determined by the PageSize property).</p>


<p>If the last page does not contain the number of records in the
PageSize property, that page is still counted as a page in the
PageCount property.</p>


</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>If the Recordset object does not support the PageCount property, the
return value is -1. This indicates that the number of pages could not
be determined.</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.AbsolutePage Property, Recordset.PageSize Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.PageSize">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.PageSize 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">pagesize = recordset</span>.PageSize</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The PageSize property indicates the number of records in a logical
page.</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 PageSize property determines how many records belong to a logical
page within your recordset. The default value is 10. This property
can be set at any time and is used with the AbsolutePage property to
move to the first record within a specified page.</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.AbsolutePage Property, Recordset.PageCount Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Properties">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.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 = recordset</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
Recordset 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 Recordset object for the data
provider.</p>


<p>The Properties collection of the Command object is not populated
until the ActiveConnection property of the Command object has been
set to an open Connection object or a valid connection string value.</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>Command.ActiveConnection Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.RecordChangeComplete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.RecordChangeComplete Event </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>RecordChangeComplete(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>                     ByVal <span class="replaceable">cRecords</span> As Long, _<br>                     ByVal <span class="replaceable">pError</span> As ADODB.Error, _<br>                     <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                     ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The RecordChangeComplete event is called after an operation changes
one or more records in the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventReasonEnum)</dt>
<dd><p>Indicates the reason for this event. Proper values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnAddNew</span>, <span class="LITERAL">adRsnDelete</span>,
<span class="LITERAL">adRsnUpdate</span>, <span class="LITERAL">adRsnUndoUpdate</span>,
<span class="LITERAL">adRsnUndoAddNew</span>,
<span class="LITERAL">adRsnUndoDelete</span>, and
<span class="LITERAL">adRsnFirstChange</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">cRecords</span> (Long)</dt>
<dd><p>Indicates how many records are affected by the operation causing this
event.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pError</span> (Error)</dt>
<dd><p>Contains details about an error that occurred if the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span>(EventStatusEnum)</dt>
<dd><p>Indicates the status of the current operation. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span>, the operation was successful. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>, the operation failed, and
the <span class="replaceable">pError</span> object contains the details
regarding the error. If the <span class="replaceable">adStatus</span>
parameter is set to <span class="LITERAL">adStatusCancel</span>, the operation
has been canceled before completion by the application. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
Recordset.AddNew Method, Recordset.CancelBatch Method,
Recordset.CancelUpdate Method, Recordset.Delete Method,
Recordset.WillChangeRecord Event, Recordset.Update Method,
Recordset.UpdateBatch Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.RecordsetChangeComplete">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.RecordsetChangeComplete Event </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>RecordsetChangeComplete(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>                        ByVal <span class="replaceable">pError</span> As ADODB.Error, _<br>                        <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                        ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The RecordsetChangeComplete event is called after an operation
changes the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventReasonEnum)</dt>
<dd><p>Indicates the reason for this event. Proper values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnReQuery</span>, <span class="LITERAL">adRsnReSynch</span>,
<span class="LITERAL">adRsnClose</span>, and <span class="LITERAL">adRsnOpen</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pError</span> (Error)</dt>
<dd><p>Contains details about an error that occurred if the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventReasonEnum)</dt>
<dd><p>Indicates the status of the current operation. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span>, the operation was successful. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusErrorsOccurred</span>, the operation failed, and
the <span class="replaceable">pError</span> object contains the details
regarding the error. If the <span class="replaceable">adStatus</span>
parameter is set to <span class="LITERAL">adStatusCancel</span>, the operation
has been canceled before completion by the application. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
Recordset.Open Method, Recordset.Requery Method,
Recordset.WillChangeRecordset Event</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.RecordCount">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.RecordCount 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">recordcount = recordset</span>.RecordCount</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The RecordCount property returns the number of records in the current
Recordset 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>If the provider or the cursor does not support the RecordCount
property, or if the number of records cannot be determined by ADO, -1
is returned.</p>


<p>The actual number of records is always returned by the RecordCount
property for Keyset or Static cursors, but -1 is always returned for
a Forward Only cursor. Dynamic cursors can return either -1 or the
actual number of records, depending upon the data source.</p>


<p>The RecordCount efficiently reports the number of records in a
recordset only if the current Recordset object supports approximate
positioning (Supports -- adApproxPosition) or bookmarks
(Supports -- adBookmark); otherwise, this property uses a lot of
resources because ADO must load all of the records to count them.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Requery">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Requery 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">recordset</span>.Requery</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 Requery method of the Recordset object re-executes the command
that created the recordset in the first place in order to cause a
refresh of the recordset. This method has the same effect as calling
the Close method followed by the Open method.</p>


<p>If you are adding a new record or editing an existing one, when you
call the Requery method, an error is generated.</p>


<p>If you wish to change properties that are read-only while a Recordset
object is open (CursorType, LockType, etc.), you must manually close
and reopen the Recordset object by calling the Close method, editing
the properties, and calling the Open method.</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>ExecuteOptionEnum</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Resync">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Resync 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">recordset</span>.Resync <span class="replaceable">AffectRecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Resync method of the Recordset object refreshes the data in the
recordset from the underlying data source.</p>

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


<dl>
<dt><span class="replaceable">AffectRecords</span> (AffectEnum)</dt>
<dd><p>Optional. An enumerator of type AffectEnum having the value of
<span class="LITERAL">adAffectCurrent</span> (1),
<span class="LITERAL">adAffectGroup</span> (2), or
<span class="LITERAL">adAffectAll</span> (3, the default).</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectCurrent</span>, the Resync method call affects
only the pending updates for the current record of the recordset.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectGroup</span>, the Resync method call affects only
the pending records that are dictated through the Filter property of
the current Recordset object. This property must be already set for
the Resync method to be called with the
<span class="LITERAL">adAffectGroup</span> parameter.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectAll</span>, all records pending updates within
the current Recordset object (including those hidden by the Filter
property) are affected by the Resync method.</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 of the Recordset object is used to resynchronize
the records in the current recordset with those found in the
underlying data source. This is very useful when you have either a
Static or a Forward Only cursor and you want to check whether anyone
else has altered the records in the data source.</p>


<p>The Resync method does not show you records that have been added to
the data source; rather, it simply updates the ones that you already
have. Therefore, the Resync method does not re-execute the underlying
command that created the recordset in the first place.</p>


<p>If the Resync method attempts to read a record that has been deleted
by another user, a runtime error does not occur. Instead, the Errors
collection is populated with warnings. A runtime error occurs only if
all of the requested records to be updated have a conflict for some
reason. You can use the Filter property with the
<span class="LITERAL">adFilterAffectedRecords</span> value and the Status
property to locate any records with conflicts.</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>Not all providers support the Resync method.</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>ADCPROP_UPDATERESYNC_ENUM Enumeration, AffectEnum Enumeration,
CursorOptionEnum Enumeration, Recordset.Supports Method, ResyncEnum
Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Save">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Save 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>recordset.Save <span class="replaceable">Destination, PersistFormat</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Save method saves the current Recordset object to a file or to a
Stream object.</p>

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


<dl>
<dt><span class="replaceable">Destination</span> (Variant)</dt>
<dd><p>Optional. Can be either a name of a file to create or a Stream object
that is to accept the saved Recordset object.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">PersistFormat</span> (PersistFormatEnum)</dt>
<dd><p>Optional. Indicates the format of the Recordset object when it is
saved. The default is <span class="LITERAL">ADTG</span>, but
<span class="LITERAL">XML</span> can also be used.</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 Save method must be invoked on an Open Recordset object. The
first time Save is called, you can specify the Destination argument,
but subsequent calls should be made omitting this argument. If the
same destination name is used on the same Recordset object, an error
will occur, but if two different names are used, both files will
remain open until the Close method is called. Omitting the
Destination name on the initial call to Save causes a file to be
created with the name of the Source to the Recordset object.</p>


<p>When saving a Recordset object with a Filter, only visible records
are saved. When saving a hierarchical recordset, the current child
Recordset, its children, and the parent Recordset are all saved. When
saving a child Recordset, only the child and its children are saved.</p>


<p>If the Save method is called while an asynchronous operation is in
effect for the Recordset object, the Save method waits until that
operation is complete before attempting to persist the Recordset
object. After the Recordset object is persisted, the record pointer
points to the first record in the Recordset.</p>


<p>You should obtain better results by setting the CursorLocation
property to the client. If the data provider does not support the
functionality necessary to save the Recordset object, then the cursor
service will. When using the server as the cursor location, you can
typically only insert, delete, or update a single table. In addition,
the Resync method is not available.</p>


<p>Microsoft warns that when persisting hierarchical recordsets in XML
format, you cannot save the Recordset if it contains pending updates
or is a parameterized hierarchical 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>PersistFormatEnum Enumeration, Recordset.Close Method,
Recordset.CursorLocation Property, Recordset.Filter Property,
Recordset.Source Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Seek">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Seek Method </td>
<td class="COMPATIBILITY">(Versions 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">recordset</span>.Seek <span class="replaceable">KeyValues, SeekOptions</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Seek method quickly changes the record pointer to the record in
the Recordset object that matches the index provided.</p>

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


<dl>
<dt><span class="replaceable">KeyValues</span> (Variant)</dt>
<dd><p>Indicates the values that are used in conjunction with the
Recordset.Index value to locate a record.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">SeekOptions</span> (SeekEnum)</dt>
<dd><p>Indicates the type of comparison used when seeking a record.</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 Seek method is used with the Index property of the Recordset
object. If the current Recordset supports indexes, you can use the
Seek method. Check the value of the Recordset.Supports (adSeek)
method call to determine whether the current Recordset object will
support this method.</p>


<p>The Index property indicates which Index is used with the Seek
method. The Seek method's first parameter, an array of Variant
values, should contain one value for each column within the currently
used Index.</p>


<p>If the record cannot be found, the record pointer is placed at the
EOF marker.</p>


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


<p>The Seek method can be used only on server-side clients, which are
opened with the CommandTypeEnum enumeration value,
<span class="replaceable">adCmdTableDirect</span>.</p>


<p>Not all providers support the Seek method.</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>CommandTypeEnum Enumeration, CursorOptionEnum Enumeration,
Recordset.EOF Property, Recordset.Index Property, SeekEnum
Enumeration, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Sort">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Sort 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">recordset</span>.Sort = <span class="replaceable">sortstring</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Sort property sorts a recordset on one or more field names.</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 Sort property can be set to sort a recordset based upon one or
more fields in either ascending or descending order. The Sort
property accepts a String value identical to a sort clause of a SQL
statement. Fields are separated by commas with either the ASC or DESC
keywords following each field name. If the ASC or DESC keyword is
absent, ASC is inferred.</p>


<p>Setting the Sort property to an empty String value (")
removes the sort from the recordset and returns the order to the
default.</p>


<p>For instance, the following value for the Sort property,
"Company ASC, Contact DESC," would sort the recordset by
the company in ascending order and then by the contact in descending
order.</p>


<p>The Sort property does not rearrange data within the recordset;
instead, it creates a temporary index for each field that does not
already have an index if the CursorLocation property is set to
<span class="LITERAL">adUseClient</span>.</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>Not all providers support the Sort 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>Recordset.CursorLocation Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Source">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Source 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">recordset</span>.Source = <span class="replaceable">source</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Source property returns the source for the data in a Recordset
object.</p>

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


<simplelist>

<member>String (Let, Get)</member>

<member>Command (Set)</member>

</simplelist>


</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>For a Recordset object, the Source property specifies from where a
recordset's data comes. The Source property for the Recordset
object is read- and write-enabled while the Recordset object is
closed, but read-only once it is opened.</p>


<p>The value of the Source property for the Recordset object can contain
one of the following:</p>


<ul><li><p>Command object variable</p></li></ul>
<ul><li><p>SQL statement</p></li></ul>
<ul><li><p>Stored procedure name</p></li></ul>
<ul><li><p>Table name</p></li></ul>
<ul><li><p>File or URL</p></li></ul>
<p>If the Source property is set to a Command object, the
ActiveConnection property of the Recordset object gets its value from
the ActiveConnection property of the Command object, but reading the
Source property does not return a Command object. Instead, it returns
the CommandText property of the associated Command object from which
you set the Source property.</p>


<p>If the Source property is set to a SQL statement, a stored procedure
name, or a table name, you would be better off specifying it in the
Options argument of the Open method, in order for the Recordset
object to optimize performance.</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.Open Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.State">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.State 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">state = recordset</span>.State</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The State property indicates the current state of the Recordset
object.</p>

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


<p>ObjectStateEnum</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 State property indicates whether the current Recordset
object is opened or closed.</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>ObjectStateEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Status">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Status 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">status = recordset</span>.Status</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 record in
relation to bulk operations.</p>

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


<p>RecordStatusEnum</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 Status property can be set to one or more of the RecordStatusEnum
enumeration values listed in <link linkend="ado-APP-E">Appendix E</link>.</p>


<p>The Status property indicates changes still pending for records that
have been updated during a batch operation.</p>


<p>In addition, the Status property indicates why the following
functions have failed: Resync, UpdateBatch, CancelBatch, and Filter
(setting equal to an array of 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.CancelBatch Method, Recordset.Filter Property,
Recordset.Resync Method, Recordset.UpdateBatch Method,
RecordStatusEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.StayInSync">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.StayInSync 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">recordset</span>.Resync <span class="replaceable">AffectRecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The StayInSync property indicates when the references to chapter
recordsets change if the record pointer moves to a different parent
row for hierarchical recordsets.</p>

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


<p>Boolean</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 StayInSync property is both read- and write-enabled. The default
value for this property is <span class="LITERAL">True</span>.</p>


<p>If the value of the StayInSync property is set to
<span class="LITERAL">True</span>, the references of chapter recordsets change
when the parent recordset is changed.</p>


<p>If the value of the StayInSync property is set to
<span class="LITERAL">False</span>, the references of chapter recordsets point
to the previous parent recordset when moving the record pointer
within a hierarchical recordset changes the parent recordset.</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Supports">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Supports 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">boolean = recordset</span>.Supports(<span class="replaceable">CursorOptions</span>)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Supports method determines whether the current data provider
supports specified functionality.</p>

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


<dl>
<dt><span class="replaceable">CursorOptions</span> (Long)</dt>
<dd><p>Represents the type functionality that you are testing for. This
value can be one or more of the CursorOptionEnum values listed in
<link linkend="ado-APP-E">Appendix E</link>.</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>Boolean</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 Supports method of the Recordset object tests whether the
Recordset object supports individual types of functionality.</p>


<p>If the values of the CursorOptionEnum values are added and passed as
the sole argument to the Supports function, a return value indicates
whether all of the questioned functionality is supported.</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>CursorOptionEnum Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.Update">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.Update 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">recordset</span>.Update <span class="replaceable">Fields, Values</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The Update method of the Recordset object saves the changes made to
fields within the current record since a call to AddNew changes the
contents of a field or array of fields.</p>

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


<dl>
<dt><span class="replaceable">Fields</span> (Variant or Variant array)</dt>
<dd><p>This argument can hold the field, ordinal position, array of fields,
or an array of ordinal positions that you wish to update in the
current record. The <span class="replaceable">Fields</span> argument must
be of the same type and dimension as that of the
<span class="replaceable">Values</span> argument.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Values</span> (Variant or Variant array)</dt>
<dd><p>Optional. This argument can hold the value or values of the fields
specified in the <span class="replaceable">Fields</span> argument. The
<span class="replaceable">Values</span> argument must be of the same type
and dimension as that of the <span class="replaceable">Fields</span>
argument.</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 current record remains the current record after the call to the
Update method.</p>


<p>If you specify an array of field names for the
<span class="replaceable">Fields</span> argument to the Update method, the
<span class="replaceable">Values</span> argument must have the same
dimensional array passed to it, containing the corresponding values
for each field listed in the Fields array. Otherwise, an error will
be generated.</p>


<p>If you move to another record while editing a record, that record
will be saved -- by an automatic call to the Update
method -- before the record position is changed. In addition, if
you are editing the current record and you call the UpdateBatch
method, the Update method will again -- automatically be called.</p>


<p>Conversely, the CancelUpdate method cancels any changes made to the
current record.</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>Not all providers support the Update method.</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>CursorOptionEnum Enumeration, Recordset.Supports Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.UpdateBatch">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.UpdateBatch 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">recordset</span>.UpdateBatch <span class="replaceable">AffectRecords</span></td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The UpdateBatch method of the Recordset object writes all pending
batch updates to disk when called.</p>

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


<dl>
<dt><span class="replaceable">AffectRecords</span> (AffectEnum)</dt>
<dd><p>The optional parameter to the UpdateBatch method is an enumerator of
type AffectEnum having the value of
<span class="LITERAL">adAffectCurrent</span> (1),
<span class="LITERAL">adAffectGroup</span> (2), or
<span class="LITERAL">adAffectAll</span> (3, the default).</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectCurrent</span>, the UpdateBatch method call
affects only the pending updates for the current record of the
recordset.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectGroup</span>, the UpdateBatch method call affects
only the pending records that are dictated through the Filter
property of the current Recordset object. This property must be
already set for the UpdateBatch method to be called with the
<span class="LITERAL">adAffectGroup</span> parameter.</p>


<p>If the value of <span class="replaceable">AffectRecords</span> is
<span class="LITERAL">adAffectAll</span>, all records pending updates within
the current Recordset object (including those hidden by the Filter
property) are affected by the UpdateBatch method.</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 UpdateBatch method transmits all pending batch updates to the
data source. This method is for use only when in batch update mode,
which should be used only with a Keyset or Static cursor.</p>


<p>It is possible to update cached field values multiple times before
committing the changes of the pending batch updates. The Update
method is automatically called if the UpdateBatch method is called
while in edit mode.</p>


<p>If you attempt to update a record that has already been deleted by
another user, a runtime error does not occur; instead, the Errors
collection is populated with warnings. A runtime error occurs only if
all of the requested records to be updated have a conflict for some
reason. You can use the Filter property with the
<span class="LITERAL">adFilterAffectedRecords</span> value and the Status
property to locate any records with conflicts.</p>


<p>Conversely, the CancelBatch method cancels all pending batch updates,</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>Not all providers support the UpdateBatch method.</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>AffectEnum Enumeration, Recordset.Supports Method, CursorOptionEnum
Enumeration</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.WillChangeField">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.WillChangeField Event </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>WillChangeField(ByVal <span class="replaceable">cFields</span> As Long, _<br>                ByVal <span class="replaceable">Fields</span> As Variant, _<br>                <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The WillChangeField event is called before an operation changes one
or more Field object values.</p>

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


<dl>
<dt><span class="replaceable">cFields</span> (Recordset object)</dt>
<dd><p>Represents the actual recordset that you wish to refresh.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">Fields</span> (Variant array)</dt>
<dd><p>Contains the Field objects that are waiting to be changed.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventStatusEnum)</dt>
<dd><p>Indicates the status of the current operation. The
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span> if the operation causing this event was
successful. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot request
that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCancel</span>, a cancellation request will
be made for this operation.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventStatusEnum Enumeration, Recordset.FieldChangeComplete Event,
Recordset.Update Method, Recordset.Value Property</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.WillChangeRecord">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.WillChangeRecord Event </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>WillChangeRecord(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>                 ByVal <span class="replaceable">cRecords</span> As Long, _<br>                 <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                 ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The WillChangeRecord event is called before an operation changes one
or more records in the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventStatusEnum)</dt>
<dd><p>Indicates the reason for this event. Proper values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnAddNew</span>, <span class="LITERAL">adRsnDelete</span>,
<span class="LITERAL">adRsnUpdate</span>, <span class="LITERAL">adRsnUndoUpdate</span>,
<span class="LITERAL">adRsnUndoAddNew</span>,
<span class="LITERAL">adRsnUndoDelete</span>, and
<span class="LITERAL">adRsnFirstChange</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">cRecords</span> (Long)</dt>
<dd><p>Indicates how many records are affected by the operation causing this
event.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventStatusEnum)</dt>
<dd><p>Indicates the status of the current operation. The
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span> if the operation causing this event was
successful. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot request
that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCancel</span>, a cancellation request will
be made for this operation.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
Recordset.AddNew Method, Recordset.CancelBatch Method,
Recordset.CancelUpdate Method, Recordset.Delete Method,
Recordset.RecordChangeComplete Event, Recordset.Update Method,
Recordset.UpdateBatch Method</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.WillChangeRecordset">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.WillChangeRecordset Event </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>WillChangeRecordset(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>                    <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>                    ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The WillChangeRecordset event is called before an operation changes
the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventReasonEnum)</dt>
<dd><p>Indicates the reason for this event. Values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnReQuery</span>, <span class="LITERAL">adRsnReSynch</span>,
<span class="LITERAL">adRsnClose</span>, and <span class="LITERAL">adRsnOpen</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span> (EventReasonEnum)</dt>
<dd><p>Indicates the status of the current operation. The
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusOK</span> if the operation causing this event was
successful. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot request
that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCancel</span>, a cancellation request will
be made for this operation.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
RecordsetChangeComplete Event, Recordset.Requery, Recordset.Open</p>


</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
</table>
</div>
<div id="Recordset.WillMove">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="NAME">
Recordset.WillMove Event </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>WillMove(ByVal <span class="replaceable">adReason</span> As ADODB.EventReasonEnum, _<br>         <span class="replaceable">adStatus</span> As ADODB.EventStatusEnum, _<br>         ByVal <span class="replaceable">pRecordset</span> As ADODB.Recordset)</td></tr>
<tr><td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr><td colspan="2" class="description">


<p>The WillMove event is called before an operation changes the position
of the record pointer within the Recordset object.</p>

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


<dl>
<dt><span class="replaceable">adReason</span> (EventReasonEnum)</dt>
<dd><p>Indicates the reason for this event. Values for the
<span class="replaceable">adReason</span> parameter are:
<span class="LITERAL">adRsnMoveFirst</span>, <span class="LITERAL">adRsnMoveLast</span>,
<span class="LITERAL">adRsnMoveNext</span>,
<span class="LITERAL">adRsnMovePrevious</span>, <span class="LITERAL">adRsnMove</span>,
<span class="LITERAL">adRsnRequery</span>.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">adStatus</span></dt>
<dd><p>Holds an EventStatusEnum value indicating the status of the current
operation. The <span class="replaceable">adStatus</span> parameter is set
to <span class="LITERAL">adStatusOK</span> if the operation causing this event
was successful. If the <span class="replaceable">adStatus</span> parameter
is set to <span class="LITERAL">adStatusCantDeny</span>, the event cannot
request that the operation be canceled. If the
<span class="replaceable">adStatus</span> parameter is set to
<span class="LITERAL">adStatusUnwantedEvent</span>, this event will not be
called again. If the <span class="replaceable">adStatus</span> parameter is
set to <span class="LITERAL">adStatusCancel</span>, a cancellation request will
be made for this operation.</p></dd>

</dl>


<dl>
<dt><span class="replaceable">pRecordset</span></dt>
<dd><p>Represents the Recordset object that fired this event.</p></dd>

</dl>


</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>EventReasonEnum Enumeration, EventStatusEnum Enumeration,
Recordset.AbsolutePage Property, Recordset.AbsolutePosition Property,
Recordset.AddNew Method, Recordset.Bookmark Method, Recordset.Filter
Property, Recordset.Index Property, Recordset.Move Method,
Recordset.MoveFirst Method, Recordset.MoveLast Method,
Recordset.MoveNext Method, Recordset.MovePrevious Method,
Recordset.Open Method, Recordset.Requery Method, Recordset.WillMove
Event</p>


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