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

📄 jdk1.5学习之rowset(一).htm

📁 Sun的高速缓存CachedRowSet方案资料档
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<DIV class=blue title=蓝色风格 onclick="changeTheme('blue');"></DIV>
<DIV class=green title=绿色风格 onclick="changeTheme('default');"></DIV></DIV>
<DIV id=rss><A id=ctl00_hlRss title=查看RSS订阅 
href="http://www.5inet.net/Develop/Java/rss.ashx">RSS 2.0</A> </DIV></DIV></DIV>
<DIV id=nav>
<DIV class=parent>
<UL>
  <LI><A href="http://www.5inet.net/News/Default.aspx">新闻 </A></LI>
  <LI><A href="http://www.5inet.net/WanLan/Default.aspx">网络管理 </A></LI>
  <LI><A class=current href="http://www.5inet.net/Develop/Default.aspx">程序开发 
  </A></LI>
  <LI><A href="http://www.5inet.net/WebPrograming/Default.aspx">网络编程 </A></LI>
  <LI><A href="http://www.5inet.net/Database/Default.aspx">数据库 </A></LI>
  <LI><A href="http://www.5inet.net/Server/Default.aspx">服务器 </A></LI>
  <LI><A href="http://www.5inet.net/Graphics/Default.aspx">图形图像 </A></LI>
  <LI><A href="http://www.5inet.net/System/Default.aspx">操作系统 </A></LI>
  <LI><A href="http://www.5inet.net/HomePage/Default.aspx">网页高手 </A></LI>
  <LI><A href="http://www.5inet.net/Digital/Default.aspx">数码时代 </A></LI>
  <LI><A href="http://www.5inet.net/SafeGuard/Default.aspx">安全防御 </A></LI>
  <LI><A href="http://www.5inet.net/Software/Default.aspx">软件教学 </A></LI>
  <LI><A href="http://www.5inet.net/Webmasters/Default.aspx">站长Club 
</A></LI></UL></DIV></DIV>
<DIV id=ctl00_ad 
style="MARGIN: 0px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; TEXT-ALIGN: center; BORDER-BOTTOM-STYLE: none"><A 
href="http://www.5inet.net/Firefox/Download.html" target=_blank><IMG 
alt="立即下载不会中毒的FireFox 2.0浏览器浏览本站" src="jdk1.5学习之RowSet(一).files/ff.gif"></A> 
</DIV>
<DIV id=navigator>
<P>您的位置:<A href="http://www.5inet.net/">首页</A> &gt;&nbsp;<A 
href="http://www.5inet.net/Develop/Default.aspx">程序开发</A> &gt;&nbsp;<A 
href="http://www.5inet.net/Develop/Java/Default.aspx">Java</A>&nbsp;&gt;&nbsp;jdk1.5学习之RowSet(一) 
</P></DIV>
<DIV id=page>
<DIV>
<DIV id=PageRegion1>
<DIV style="MARGIN-TOP: 4px; DISPLAY: none; MARGIN-LEFT: 4px"></DIV><BR>
<H1 id=ctl00_ContentPlaceHolder1_ArticleTitle>jdk1.5学习之RowSet(一)</H1>
<UL>
  <LI id=ctl00_ContentPlaceHolder1_ArticleFrom>出处:统一教学网 
  <LI id=ctl00_ContentPlaceHolder1_ArticleAuthor>作者:jFresH_MaN 
  <LI id=ctl00_ContentPlaceHolder1_ArticleEditor>编辑:N/A 
  <LI id=ctl00_ContentPlaceHolder1_DateCreated>发表日期:2006-6-25 15:40:00 
  <LI id=ctl00_ContentPlaceHolder1_ArticleKeywords>关 键 字: 
  <DIV style="MARGIN-LEFT: 4px; OVERFLOW: hidden; HEIGHT: 39px"><A 
  id=ctl00_ContentPlaceHolder1_rptKeywords_ctl01_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q=jdk1.5%e8%af%b4%e6%98%8e%e6%96%87%e6%a1%a3">jdk1.5说明文档</A> 
  <A id=ctl00_ContentPlaceHolder1_rptKeywords_ctl02_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q="></A><A 
  id=ctl00_ContentPlaceHolder1_rptKeywords_ctl03_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q=resultset">resultset</A> 
  <A id=ctl00_ContentPlaceHolder1_rptKeywords_ctl04_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q=rowset%e5%8c%ba%e5%88%ab">rowset区别</A> 
  <A id=ctl00_ContentPlaceHolder1_rptKeywords_ctl05_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q=CachedRowSet%e5%ad%a6%e4%b9%a0">CachedRowSet学习</A> 
  <A id=ctl00_ContentPlaceHolder1_rptKeywords_ctl06_HyperLink1 
  href="http://www.5inet.net/Develop/Java/Search.aspx?q=oracle%e4%b8%ad%e6%9c%89%e6%b2%a1%e6%9c%89%e5%ae%9e%e7%8e%b0CachedRowSet">oracle中有没有实现CachedRowSet</A> 
  </DIV></LI></UL>
<DIV class=parent><BR>
<DIV id=content>
<DIV class=cPanelContainer id=ctl00_ContentPlaceHolder1_cp2 
style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FLOAT: right; PADDING-BOTTOM: 2px; MARGIN: 2px; WIDTH: 250px; PADDING-TOP: 2px">
<DIV class=parent 
style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none">
<DIV class=child2>
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-5759554067406384";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250x250_as";
google_ad_type = "text_image";
//2006-12-29: Content
google_ad_channel = "9978730241";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "07519A";
google_color_text = "000000";
google_color_url = "000000";
//--></SCRIPT>

<SCRIPT src="jdk1.5学习之RowSet(一).files/show_ads.js" type=text/javascript>
</SCRIPT>
</DIV></DIV></DIV>
<DIV style="FLOAT: right; WIDTH: 32px; HEIGHT: 250px">
<UL>
  <LI style="MARGIN-TOP: 41px"><IMG src="jdk1.5学习之RowSet(一).files/zny.gif"> 
  <LI style="MARGIN-TOP: 41px"><IMG src="jdk1.5学习之RowSet(一).files/pup.gif"> 
  <LI style="MARGIN-TOP: 41px"><IMG src="jdk1.5学习之RowSet(一).files/adc.gif"> 
</LI></UL></DIV><SPAN id=ctl00_ContentPlaceHolder1_ArticleContent>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT 
size=3><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">jdk1.4</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">javax.sql</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包中有一个</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">RowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口,但是没有具体实现的类。</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">”Tiger”</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">诞生之后,引入了</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">javax.sql.rowset</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包中的五个子接口和</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">com.sun.rowset</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包里面的对应的五个实现类,这样我们就可是使用功能强大的</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">RowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了。</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">jdk1.5</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">RowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的五个子接口分别是</SPAN><SPAN 
lang=EN-US><FONT 
face="Times New Roman">JdbcRowSet,CachedRowSet,WebRowSet,JoinRowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">FilteredRowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,
<DIV 
id=bibsekpghifpsv>TT,育.%f国mxtqDn</DIV>他们为我们的数据库开发带来了强大的功能和方便的操作。</SPAN></FONT>
<P></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT 
size=3><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我的</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">java</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境是</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">:RedHat 9</FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN 
lang=EN-US><FONT face="Times New Roman"><FONT size=3><SPAN 
style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Jdk <CHSDATE isrocdate="False" islunardate="False" day="30" month="12" 
year="1899" w:st="on">1.5.1</CHSDATE>_01</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN 
lang=EN-US><FONT face="Times New Roman"><FONT size=3><SPAN 
style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Eclipse <CHMETCNV w:st="on" tcsc="0" numbertype="1" negative="False" 
hasspace="False" sourcevalue="3.1" 
unitname="m">3.1m</CHMETCNV>4</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN 
lang=EN-US><FONT face="Times New Roman"><FONT size=3><SPAN 
style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>MySql <CHSDATE isrocdate="False" islunardate="False" day="30" month="12" 
year="1899" w:st="on">4.1.10</CHSDATE><SPAN style="mso-spacerun: yes">&nbsp; 
</SPAN>(JDBC Driver:org.gjt.mm.mysql.Driver)<SPAN 
style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT 
size=3><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我首先在</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">test</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库里面创建了两个表用于这次的学习,<SPAN 
id=lafofbmhinecrhugcsr>+WkZAe教Tu."9Ix9专T)E</SPAN>下面是脚本:</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT 
face="Times New Roman" size=3>create table table1 (id int not null , name 
varchar(20) not null);</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT 
face="Times New Roman" size=3>create table table2 (id int not null, info 
varchar(20) not null); </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后我就插入了一些数据用于测试。以下内容以我的环境示意,大家只要修改相应地方就可用于自己的测试。</SPAN><SPAN 
lang=EN-US><SPAN style="mso-spacerun: yes"><FONT 
face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></SPAN></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT 
size=3><SPAN lang=EN-US><FONT face="Times New Roman">RowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象可分为两类:有连接的和无连接的。</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">JdbcRowSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是唯一一个有连接的实现,和传统的</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">ResultSet</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个样,有连接的实现是基于</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">Jdbc</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动的连接,数据库的连接是贯穿整个对数据库的操作。而无连接的实现是基于</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">Reader</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN 
lang=EN-US><FONT face="Times New Roman">Writer</FONT></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">流的连接,在需要读取数据和写入数据的时候才建立连接,在整个操作过程中都是断开连接的,后面四个接口对象都是无连接的实现。下面我就针对每一个接口来介绍一下它们各自的功能。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><SPAN 
lang=EN-US>

⌨️ 快捷键说明

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