⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ado_ref_recordset.asp

📁 W3Schools tutorial..web designing
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!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 Recordset Object</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">
<script type="text/javascript"><!--
google_ad_client = "pub-3440800076797949";
/*txtimg*/
google_ad_slot = "5330033957";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="../../pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<noscript>
<a href="../default.asp" target="_blank"><img src="../banners/w6.gif" border="0" alt="W3Schools" /></a>
</noscript>

<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" style='font-weight:bold;'>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 Recordset Object</h1>
<a href="ado_ref_record.asp"><img border="0" src="../images/btn_previous.gif" alt="prev" width="100" height="20" /></a>
<a href="ado_ref_stream.asp"><img border="0" src="../images/btn_next.gif" alt="next" width="100" height="20" /></a>
<hr />

<h2>Examples</h2>

<p><a target="_blank" href="showasp.asp@filename=demo_ado_getrows">GetRows</a><br />
This example demonstrates how to use the GetRows method.</p>

<hr />

<h2>Recordset Object</h2>

<p>The ADO Recordset object is used to hold a set of records from a database table.
A Recordset object consist of records and columns (fields).</p>

<p>In ADO, this object is the most important and the one used most often to 
manipulate data from a database.</p>

<h3>ProgID</h3>

<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
  <tr valign="top">
    <td valign="top">
      <pre>set objRecordset=Server.CreateObject(&quot;ADODB.recordset&quot;)</pre>
    </td>
  </tr>
</table>
<br />
When you first open a Recordset, the current record pointer will point to the first record and the BOF and EOF properties are
False. If there are no records, the BOF and EOF property are True.

<p>Recordset objects can support two types of updating:&nbsp;</p>

<ul>
  <li><b>Immediate updating</b> - all changes are written immediately to the
    database once you call the Update method.</li>
  <li><b>Batch updating</b> - the provider will cache multiple changes and then 
  send them to the database with the UpdateBatch method.</li>
</ul>

<p>In ADO there are 4 different cursor types defined:</p>

<ul>
  <li><b>Dynamic cursor</b> - Allows you to see additions, changes, and deletions by other
    users.</li>
  <li><b>Keyset cursor - </b>Like a dynamic cursor, except that
    you cannot see additions by other users, and it prevents access to records that other users
    have deleted. Data changes by other users will still be visible.</li>
  <li><b>Static cursor </b>- Provides a static copy of a recordset for you to use to find data or generate
    reports. Additions, changes, or deletions by other users will not be visible. This is the only type of cursor allowed when you open a client-side Recordset object.</li>
  <li><b>Forward-only cursor </b>- Allows you to only scroll forward through the Recordset. Additions, changes, or deletions by other users will not be visible.&nbsp;</li>
</ul>
<p>The cursor type can be set by the CursorType property or by the CursorType
parameter in the Open method.</p>
<p><b>Note:</b> Not all providers support all methods or properties of the Recordset
object.</p>

<hr />
<h3>Properties</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
  <tr valign="top">
    <th width="35%" align="left" valign="top">Property</th>
    <th width="65%" align="left" valign="top">Description</th>
  </tr>
  <tr valign="top">
    <td valign="top"><a href="prop_rs_absolute.asp">AbsolutePage</a></td>
    <td valign="top">Sets or returns a value that specifies the page number in
      the Recordset object</td>
  </tr>
  <tr valign="top">
    <td valign="top"><a href="prop_rs_absolute.asp">AbsolutePosition</a></td>
    <td valign="top">Sets or returns a value that specifies the ordinal position
      of the current record in the Recordset object</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_active.asp">ActiveCommand</a></td>
    <td valign="top">Returns the Command object associated with the Recordset</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_active.asp">ActiveConnection</a></td>
    <td valign="top">Sets or returns a definition for a connection if the connection is closed,
    or the current Connection object if the connection is open</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_bofeof.asp">BOF</a></td>
    <td valign="top">Returns true if the current record position is before the first record, otherwise false</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_bookmark.asp">Bookmark</a></td>
    <td valign="top">Sets or returns a bookmark. The bookmark saves the position of the current record</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_cachesize.asp">CacheSize</a></td>
    <td valign="top">Sets or returns the number of records that can be cached</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_cursorlocation.asp">CursorLocation</a></td>
    <td valign="top">Sets or returns the location of the cursor service</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_cursortype.asp">CursorType</a></td>
    <td valign="top">Sets or returns the cursor type of a Recordset object</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_datamember.asp">DataMember</a></td>
    <td valign="top">Sets or returns the name of the data member that will be
      retrieved from the object referenced by the DataSource property</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_datasource.asp">DataSource</a></td>
    <td valign="top">Specifies an object containing data to be represented as a Recordset object</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_rs_editmode.asp">EditMode</a></td>
    <td valign="top">Returns the editing status of the current record</td>
  </tr>
  <tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -