📄 ev_rs_move.asp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ADO WillMove and MoveComplete Events</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="stylesheet" type="text/css" href="../stdtheme.css" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<a name="top"></a>
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#808080">
<tr>
<td width="234" valign="top">
<a href="../default.htm"><img src="../images/w3default80.jpg" border="0" alt="W3Schools" /></a>
</td>
<th valign="middle" align="left" class="right">
<iframe style="background-color:#808080" src="../banners/bannerframe.asp@adpartner=xmlmaster" height="90" width="728"
marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<br /></th>
</tr>
</table>
<table style="margin-left:1px" width="800px" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="137" class="content" valign="top"><br />
<a class="left" href="../default.asp" target="_top">
<img src="../images/homeicon.gif" border="0" alt="home" /></a>
<a class="left" href="../default.asp" target="_top">
<b>HOME</b></a>
<br /><br />
<b>ADO Tutorial</b><br />
<a class="left" target="_top" href="default.asp" >ADO HOME</a><br />
<a class="left" target="_top" href="ado_intro.asp" >ADO Intro</a><br />
<a class="left" target="_top" href="ado_connect.asp" >ADO Connect</a><br />
<a class="left" target="_top" href="ado_recordset.asp" >ADO Recordset</a><br />
<a class="left" target="_top" href="ado_display.asp" >ADO Display</a><br />
<a class="left" target="_top" href="ado_query.asp" >ADO Query</a><br />
<a class="left" target="_top" href="ado_sort.asp" >ADO Sort</a><br />
<a class="left" target="_top" href="ado_add.asp" >ADO Add</a><br />
<a class="left" target="_top" href="ado_update.asp" >ADO Update</a><br />
<a class="left" target="_top" href="ado_delete.asp" >ADO Delete</a><br />
<a class="left" target="_top" href="ado_demo.asp" >ADO Demo</a><br />
<a class="left" target="_top" href="ado_getstring.asp" >ADO Speed Up</a><br />
<br />
<b>ADO Objects</b><br />
<a class="left" target="_top" href="ado_ref_command.asp" >ADO Command</a><br />
<a class="left" target="_top" href="ado_ref_connection.asp" >ADO Connection</a><br />
<a class="left" target="_top" href="ado_ref_error.asp" >ADO Error</a><br />
<a class="left" target="_top" href="ado_ref_field.asp" >ADO Field</a><br />
<a class="left" target="_top" href="ado_ref_parameter.asp" >ADO Parameter</a><br />
<a class="left" target="_top" href="ado_ref_property.asp" >ADO Property</a><br />
<a class="left" target="_top" href="ado_ref_record.asp" >ADO Record</a><br />
<a class="left" target="_top" href="ado_ref_recordset.asp" >ADO Recordset</a><br />
<a class="left" target="_top" href="ado_ref_stream.asp" >ADO Stream</a><br />
<a class="left" target="_top" href="ado_datatypes.asp" >ADO DataTypes</a><br />
<br />
<a class="left" target="_top" href="ado_summary.asp" >ADO Summary</a><br />
<br />
<b>Examples</b><br />
<a class="left" target="_top" href="ado_examples.asp" >ADO Examples</a><br />
<br />
<b>Exam</b><br />
<a class="left" target="_top" href="../cert/default.asp" >ADO Exam</a><br />
<br />
<b>Selected Reading</b><br />
<a class="left" target="_top" href="../browsers/browsers_stats.asp">Web Statistics</a><br />
<a class="left" target="_top" href="../site/site_glossary.asp">Web Glossary</a><br />
<a class="left" target="_top" href="../hosting/default.asp">Web Hosting</a><br />
<a class="left" target="_top" href="../quality/default.asp">Web Quality</a><br /><br />
<a class="left" target="_top" href="../forum/default.asp">W3Schools Forum</a><br /><br />
<a class="left" target="_top" href="../about/about_helping.asp">Helping W3Schools</a><br /><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3440800076797949";
/*LeftLinkUnit*/
google_ad_slot = "4854527104";
google_ad_width = 120;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="../../pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td valign="top">
<table style="border: 1px solid gray" width="100%" bgcolor="#FFFFFF" border="0" cellpadding="5" cellspacing="0">
<tr>
<td>
<h1>ADO WillMove and MoveComplete Events</h1>
<hr />
<a href="ado_ref_recordset.asp"><img class="navup" src="../images/up.gif" alt="Recordset Object Reference" border="0" /> Complete Recordset Object Reference</a>
<hr />
<h3> The WillMove Event
</h3>
<p> The WillMove event is triggered before an operation changes the current
position in the Recordset.
</p>
<p> <b>Note:</b> Before this event returns, set the status parameter to adStatusCancel to
cancel the operation that caused this event or set it to adStatusUnwantedEvent to prevent subsequent notications.
</p>
<h3> The MoveComplete Event
</h3>
<p> The MoveComplete event is triggered after the current position in the Recordset
has changed.
</p>
<p> <b>Note:</b> Before this event returns, set the status parameter to adStatusUnwantedEvent to prevent subsequent notifications.
</p>
<p> <b>Note:</b> The WillMove event or MoveComplete event may occur when calling
one of the following Recordset method: Open, Move, MoveFirst, MoveLast, MoveNext, MovePrevious, AddNew, and Requery. These events may
also occur because of the following properties: Filter, Index, Bookmark, AbsolutePage, and AbsolutePosition.
</p>
<h3> Syntax
</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<td valign="top">
<pre>WillMove reason,status,objRs</pre>
<pre>MoveComplete reason,objErr,status,objRs</pre>
</td>
</tr>
</table>
<br />
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" valign="top" width="20%">Parameter</th>
<th align="left" valign="top" width="80%">Description</th>
</tr>
<tr>
<td valign="top">reason </td>
<td valign="top">
An <a href="#eventreasonenum">EventReasonEnum</a> value that specifies the
reason for this event
</td>
</tr>
<tr>
<td valign="top">status </td>
<td valign="top"> An <a href="#EventStatusEnum">EventStatusEnum</a> value
that indicates the status of the execution of the event
</td>
</tr>
<tr>
<td valign="top">objErr </td>
<td valign="top"> The name of an Error object that describes the error if
status is set to adStatusErrorsOccurred, otherwise it is not set
</td>
</tr>
<tr>
<td valign="top">objRs </td>
<td valign="top"> The name of the Recordset object that triggered this
event
</td>
</tr>
</table>
<br />
<hr />
<a name="eventreasonenum"><h3>EventReasonEnum Values</h3></a>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th width="30%" align="left" valign="top">Constant</th>
<th width="10%" align="left" valign="top">Value</th>
<th width="60%" align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top">adRsnRequery</td>
<td valign="top">7</td>
<td valign="top"> An operation requeried the Recordset</td>
</tr>
<tr>
<td valign="top">adRsnMove</td>
<td valign="top">10</td>
<td valign="top"> An operation moved the record pointer within the
Recordset</td>
</tr>
<tr>
<td valign="top">adRsnMoveFirst</td>
<td valign="top">12</td>
<td valign="top">An operation moved the record pointer to the first record in the
Recordset</td>
</tr>
<tr>
<td valign="top">adRsnMoveNext</td>
<td valign="top">13</td>
<td valign="top">An operation moved the record pointer to the next record in the
Recordset</td>
</tr>
<tr>
<td valign="top">adRsnMovePrevious</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -