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

📄 mdmthnextrecx.htm

📁 ADO使用手册,非常详细
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML dir=ltr>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=gb2312"><title>NextRecordset 方法范例</title>
<style>@import url(msdn_ie4.css);</style>
</HEAD>
<BODY>
<h3><a name="mdmthnextrecx"></a>NextRecordset 方法范例</h3>
<p>
该范例使用 NextRecordset 方法,查看使用了由三个独立 <b>SELECT</b> 语句组成的复合命令语句的记录集中的数据。</p>
<pre>Public Sub NextRecordsetX()   Dim rstCompound As ADODB.Recordset
   Dim strCnn As String
   Dim intCount As Integer   ' 打开复合记录集。
      strCnn = "Provider=sqloledb;" &amp; _
      "Data Source=srv;Initial Catalog=pubs;User Id=sa;Password=; "
   
   Set rstCompound = New ADODB.Recordset
   rstCompound.Open "SELECT * FROM authors; " &amp; _
      "SELECT * FROM stores; " &amp; _
      "SELECT * FROM jobs", strCnn, , , adCmdText   ' 显示每一个 SELECT 语句的结果。
   intCount = 1
   Do Until rstCompound Is Nothing
      Debug.Print "Contents of recordset #" &amp; intCount
      Do While Not rstCompound.EOF
         Debug.Print , rstCompound.Fields(0), _
            rstCompound.Fields(1)
         rstCompound.MoveNext
      Loop
   
      Set rstCompound = rstCompound.NextRecordset
      intCount = intCount + 1
   Loop
   
End Sub
</pre>
<center> <A HREF="http://www.51windows.Net">www.51windows.Net</A></center>
<SCRIPT LANGUAGE="JavaScript" src="/log/sitelog2.asp"></SCRIPT>
<script src="script.js"></script></BODY>
</HTML>

⌨️ 快捷键说明

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