﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Java Sky  of  Zhao-文章分类-Java VS DataBase</title><link>http://www.blogjava.net/SINOJAVA/category/9698.html</link><description>受挫一次,对生活的理解加深一层;失误一次对人生的感悟增添一阶;不幸一次,对世界的认识成熟一级;磨难一次,对成功的内涵透彻一遍!</description><language>zh-cn</language><lastBuildDate>Wed, 07 Mar 2007 13:20:48 GMT</lastBuildDate><pubDate>Wed, 07 Mar 2007 13:20:48 GMT</pubDate><ttl>60</ttl><item><title>[转]JAVA与数据库连接方法(1.2.3) </title><link>http://www.blogjava.net/SINOJAVA/articles/40154.html</link><dc:creator>SINOJAVA</dc:creator><author>SINOJAVA</author><pubDate>Sun, 09 Apr 2006 23:22:00 GMT</pubDate><guid>http://www.blogjava.net/SINOJAVA/articles/40154.html</guid><wfw:comment>http://www.blogjava.net/SINOJAVA/comments/40154.html</wfw:comment><comments>http://www.blogjava.net/SINOJAVA/articles/40154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SINOJAVA/comments/commentRss/40154.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SINOJAVA/services/trackbacks/40154.html</trackback:ping><description><![CDATA[
		<strong>[转]<br />JAVA与数据库连接方法（一）<img height="19" src="http://www.blogjava.net/Emoticons/thumbs_down.gif" width="19" border="0" /> <br /></strong>  
<p>用JAVA连接数据库主要有两种方式，<font color="#0000ff">一是用JDBC-ODBC桥来连接</font>，<font color="#0000ff">二是用相关厂商提供的相应驱动程序来连接，首先谈谈第一种连接。</font></p><p>JDBC-ODBC桥接器是用JdbcOdbc.Class和一个用于访问ODBC驱动程序的本地库实现的。对于WINDOWS平台，该本地库是一个动态连接库DLL</p><p>(JDBCODBC.DLL)。 </p><p>由于JDBC在设计上与ODBC很接近。在内部，这个驱动程序把JDBC的方法映射到ODBC调用上，这样，JDBC就可以和任何可用的ODBC驱动程序进行</p><p>交互了。这种桥接器的优点是，它使JDBC目前有能力访问几乎所有的数据库。通行方式如图所示： </p><p>应用程序---JDBC API---JDBC-ODBC---ODBC API---ODBC层---数据源 </p><p>具体操作方法为： </p><p>首先打开控制面板的管理工具，打开数据源（ODBC），在用户DSN里面添加数据源（即你要连接的数据库的名字），在这里假定连接SQL SERVER </p><p>2000的GoodsSupply数据库。名称填写你要连接的数据库的名称（GoodsSupply），然后逐步设置，如果选用了使用SQL-SERVER密码认证的话，</p><p>就要输入相应的用户名及密码连接到数据库。一路下一步设置完成。 </p><p>在JAVA里面编写程序进行测试，在这里我的程序是让用户输入任意的表名与与列名，把该列的所有数据输出。源代码如下： </p><p>import java.io.BufferedReader; <br />import java.io.InputStreamReader; <br />import java.sql.*; </p><p>public class ODBCBridge { </p><p>public static void main(String[] args) { <br />String url="jdbc:odbc:GoodsSupply"; <br />Statement sm=null; <br />String command=null; <br />ResultSet rs=null; <br />String tableName=null; <br />String cName=null; <br />String result=null; <br />BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); <br />try { <br />try { <br />Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //加载驱动 <br />}catch(ClassNotFoundException e){ <br />System.out.println("Can not load Jdbc-Odbc Bridge Driver"); <br />System.err.print("ClassNotFoundException:"); <br />System.err.println(e.getMessage()); <br />} <br />Connection con=DriverManager.getConnection(url,"USER","PASSWORD"); //使用SQL-SERVER2000认证 <br />DatabaseMetaData dmd=con.getMetaData(); //DMD为连接的相应情况 <br />System.out.println("连接的数据库:"+dmd.getURL()); <br />System.out.println("驱动程序:"+dmd.getDriverName()); <br />sm=con.createStatement(); <br />System.out.println("输入表名"); <br />tableName=input.readLine(); <br />while(true) { <br />System.out.println("输入列名(为空时程序结束):"); <br />cName=input.readLine(); <br />if(cName.equalsIgnoreCase("")) <br />break; <br />command="select "+cName+" from "+tableName; <br />rs=sm.executeQuery(command); //执行查询 <br />if(!rs.next()) <br />System.out.println("表名或列名输入有误"); <br />else { <br />System.out.println("查询结果为:"); <br />do <br />{ <br />result=rs.getString(cName); <br />//数据库语言设置为中文，不用转换编码 <br />//result=new String(result.getBytes("ISO-8859-1"),"GB2312"); <br />System.out.println(result); <br />}while(rs.next()); <br />} <br />} <br />}catch(SQLException ex) { <br />System.out.println("SQLException:"); <br />while(ex!=null) { <br />System.out.println("Message:"+ex.getMessage()); <br />ex=ex.getNextException(); <br />} <br />}catch(Exception e) { <br />System.out.println("IOException"); <br />} <br />} <br />}  </p><p align="center"><br /><strong>JAVA与数据库连接方法（二）</strong><img height="19" src="http://www.blogjava.net/Emoticons/thumbs_down.gif" width="19" border="0" /></p><p>现在介绍第二种方法，用关厂商提供的相应驱动程序来连接。 </p><p>这种实现方法是直接使用数据库厂商提供的用专用的网络协议创建的驱动程序，通过它可以直接将JDBC API调用转换为直接网络调用。这种调</p><p>用方式一般性能比较好，而且也是实用中最简单的方法。因为它步需要安装其他的库或中间件。几乎所有的数据库厂商都为他们的数据库提供</p><p>了这种数据库提供了这种JDBC驱动程序，也可以从第三方厂商获得这些驱动程序。 </p><p>从网址<a href="http://industry.java.sun.com/products/jdbc/drivers/"><font color="#4371a6">http://industry.Java.sun.com/products/jdbc/drivers/</font></a>可以看到所有有用的驱动程序的清单。其结果如图所示： </p><p>应用程序---JDBC API---驱动程序---数据源 </p><p>这里首先要安装JDBC的驱动程序，推荐SP2版本的，可从微软网站上下载 <br /><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&amp;DisplayLang=en"><font color="#4371a6">http://www.microsoft.com/downloads/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&amp;DisplayLang=en</font></a> 下载最下面的</p><p>SETUP.EXE </p><p>这个驱动程序要配合SQL SERVER2000 SP3A，相应下载URL为 <br /><a href="http://www.microsoft.com/china/sql/downloads/sp3.asp"><font color="#4371a6">http://www.microsoft.com/china/sql/downloads/sp3.asp</font></a> 下载 chs_sql2ksp3.exe </p><p>如果用JAVA SDK直接编译运行的话需要设置环境变量，将安装好的JDBC驱动里面的LIB三个文件设置为环境变量： <br />classpath： <br />D:\program files\Microsoft SQL Server\jdbc\lib\msbase.jar; <br />D:\program files\Microsoft SQL Server\jdbc\lib\mssqlserver.jar; <br />D:\program files\Microsoft SQL Server\jdbc\lib\msutil.jar; </p><p>安装即可用微软的驱动程序连接数据库了，相应代码与前面基本相同： </p><p>import java.sql.*; <br />import java.io.*; <br />public class DBColumn { </p><p>public static void main(String[] args) { <br />Connection con=null; <br />Statement sm=null; <br />String command=null; <br />ResultSet rs=null; <br />String tableName=null; <br />String cName=null; <br />String result=null; <br />BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); <br />try <br />{ <br />Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); <br />System.out.println("驱动程序已加载"); <br />//SQL SERVER的登陆方式必须为使用SQL SERVER密码登陆认证方式 <br />con=DriverManager.getConnection("jdbc:microsoft:sqlserver://SERVERNAME:1433","USER","PASSWORD"); <br />con.setCatalog("GoodsSupply"); <br />System.out.println("OK,成功连接到数据库"); <br />}catch(Exception ex) { <br />ex.printStackTrace(); <br />} <br />try <br />{ <br />sm=con.createStatement(); <br />System.out.println("输入表名"); <br />tableName=input.readLine(); <br />while(true) { <br />System.out.println("输入列名(为空时程序结束):"); <br />cName=input.readLine(); <br />if(cName.equalsIgnoreCase("")) <br />break; <br />command="select "+cName+" from "+tableName; <br />rs=sm.executeQuery(command); <br />if(!rs.next()) <br />System.out.println("表名或列名输入有误"); <br />else { <br />System.out.println("查询结果为:"); <br />do <br />{ <br />result=rs.getString(cName); <br />//result=new String(result.getBytes("ISO-8859-1"),"GB2312"); <br />System.out.println(result); <br />}while(rs.next()); <br />} <br />} <br />}catch(Exception ex) { <br />ex.printStackTrace(); <br />} <br />} <br />} </p><p> </p><p><br />                                                                 <strong>JAVA与数据库连接方法（三）<img height="19" src="http://www.blogjava.net/Emoticons/thumbs_down.gif" width="19" border="0" /><br /></strong><br />最后给出JAVA连接其他数据库的关键代码：</p><p>1、Oracle8/8i/9i数据库（thin模式）    <br />Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();    <br />String  url="jdbc:oracle:thin:@localhost:1521:orcl";    <br />//orcl为数据库的SID    <br />String  user="test";    <br />String  password="test";    <br />Connection  conn=  DriverManager.getConnection(url,user,password);    <br /> <br />2、DB2数据库    <br />Class.forName("com.ibm.db2.jdbc.app.DB2Driver  ").newInstance();    <br />String  url="jdbc:db2://localhost:5000/sample";    <br />//sample为你的数据库名    <br />String  user="admin";    <br />String  password="";    <br />Connection  conn=DriverManager.getConnection(url,user,password);     <br /> <br />3、Sybase数据库    <br />Class.forName("com.sybase.jdbc.SybDriver").newInstance();    <br />String  url  ="  jdbc:sybase:Tds:localhost:5007/myDB";    <br />//myDB为你的数据库名    <br />Properties  sysProps  =  System.getProperties();    <br />SysProps.put("user","userid");    <br />SysProps.put("password","user_password");    <br />Connection  conn=  DriverManager.getConnection(url,  SysProps);    <br /> <br />4、Informix数据库    <br />Class.forName("com.informix.jdbc.IfxDriver").newInstance();    <br />String  url  =    <br />"jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver;    <br />user=testuser;password=testpassword";    <br />//myDB为数据库名    <br />Connection  conn=  DriverManager.getConnection(url);    <br /> <br />5、MySQL数据库    <br />Class.forName("org.gjt.mm.mysql.Driver").newInstance();    <br />String  url  ="jdbc:mysql://localhost/myDB?user=soft&amp;password=soft1234&amp;useUnicode=  <br />true&amp;characterEncoding=8859_1"    <br />//myDB为数据库名    <br />Connection  conn=  DriverManager.getConnection(url);    <br /> <br />6、PostgreSQL数据库    <br />Class.forName("org.postgresql.Driver").newInstance();    <br />String  url  ="jdbc:postgresql://localhost/myDB"    <br />//myDB为数据库名    <br />String  user="myuser";    <br />String  password="mypassword";    <br />Connection  conn=  DriverManager.getConnection(url,user,password); </p><img src ="http://www.blogjava.net/SINOJAVA/aggbug/40154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SINOJAVA/" target="_blank">SINOJAVA</a> 2006-04-10 07:22 <a href="http://www.blogjava.net/SINOJAVA/articles/40154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]JDBC如何连接SQL SERVER 2000的默认实例和命名实例</title><link>http://www.blogjava.net/SINOJAVA/articles/40152.html</link><dc:creator>SINOJAVA</dc:creator><author>SINOJAVA</author><pubDate>Sun, 09 Apr 2006 23:16:00 GMT</pubDate><guid>http://www.blogjava.net/SINOJAVA/articles/40152.html</guid><wfw:comment>http://www.blogjava.net/SINOJAVA/comments/40152.html</wfw:comment><comments>http://www.blogjava.net/SINOJAVA/articles/40152.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SINOJAVA/comments/commentRss/40152.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SINOJAVA/services/trackbacks/40152.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">[</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">原创</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">]</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">SQL SERVER 2000</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的默认实例和命名实例</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">
								<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 5cm; mso-char-indent-count: 13.5">
				<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 94.5pt; mso-char-indent-count: 9.0">
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">引用请注明出处</span>
				<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">:http//www.blogjava.net/SINOJAVA<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: red">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">(</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一</span>
				<span lang="EN-US" style="COLOR: blue">)</span>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">下载</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">Microsoft SQL Server 2000 Service Pack 3a</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">并安装</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #333333">
						<br />
				</span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=90DCD52C-0488-4E46-AFBF-ACACE5369FA3&amp;displaylang=zh-cn">http://www.microsoft.com/downloads/details.aspx?FamilyId=90DCD52C-0488-4E46-AFBF-ACACE5369FA3&amp;displaylang=zh-cn</a>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">(</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二</span>
				<span lang="EN-US" style="COLOR: blue">)</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下载并安装</span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">SQL SERVER 2000</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">得</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">驱动</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">(</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue">SQL Server 2000 Driver for JDBC Service Pack 3</span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">)<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&amp;displaylang=en</a>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">(</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三</span>
				<span lang="EN-US" style="COLOR: blue">)</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置</span>
				<span lang="EN-US" style="COLOR: blue">JDBC</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动</span>
				<span lang="EN-US" style="COLOR: blue">classpath</span>
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境变量</span>
				<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法</span>
				<span lang="EN-US" style="COLOR: blue">1:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">填加</span>
				<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注</span>
						<span lang="EN-US" style="COLOR: black">: C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为我</span>
						<span lang="EN-US" style="COLOR: black">JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得安装路径</span>
						<span lang="EN-US" style="COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法</span>
				<span lang="EN-US" style="COLOR: blue">2:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<span lang="EN-US" style="COLOR: blue">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将</span>
						<span lang="EN-US" style="COLOR: black">mssqlserver.jar; msutil.jar; msbase.jar</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">拷贝到</span>
						<span lang="EN-US" style="COLOR: black">JDK</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得</span>
						<span lang="EN-US" style="COLOR: black">lib</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下</span>
						<span lang="EN-US" style="COLOR: black">,</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后设置</span>
						<span lang="EN-US" style="COLOR: black">classpath<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">D:\Java\jdk1.5.0_05\lib\sqlserver\msutil.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">D:\Java\jdk1.5.0_05\lib\sqlserver\msbase.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black">D:\Java\jdk1.5.0_05\lib\sqlserver\mssqlserver.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">(</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">四</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">)</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">创建连接数据库默认实例得连接代码</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">:<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">public class ConSqlserver {<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>Connection con=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>//Statement st=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>//ResultSet re=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>public ConSqlserver()<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>try<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>String driver="com.microsoft.jdbc.sqlserver.SqlServerDriver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Northwind";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>Class.forName(driver).newInstance(); <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>con =DriverManager.getConnection(url,"sa","zhaopf");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>con.close();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>catch(Exception e)<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 3">                   </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">       </span>public static void main(String[] args) <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>// TODO </span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">自动生成方法存根</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>ConSqlserver con=new ConSqlserver();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">(</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">四</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">)</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">创建连接数据库默认实例得连接代码</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">(</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">实例名为</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">SINOIT\SINOSERVER)</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-char-type: symbol; mso-symbol-font-family: Wingdings">
								<span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">L</span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">public class ConSqlserverppp {<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>Connection con=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>//Statement st=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>//ResultSet re=null;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>public ConSqlserverppp()<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>try<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>//String driver="com.microsoft.jdbc.sqlserver.SqlServerDriver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>
								<span style="mso-tab-count: 1">       </span>
								<span style="mso-spacerun: yes">    </span>String url="jdbc:microsoft:sqlserver://SINOIT\\SINOSERVER;DatabaseName=Northwind";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 3">                   </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>//Class.forName(driver);//.newInstance();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>con =DriverManager.getConnection(url,"sa","zse");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>//st=con.createStatement();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<span style="mso-spacerun: yes">    </span>con.close();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>catch(Exception e)<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 3">                   </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>public static void main(String[] args) <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>{<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 2">            </span>ConSqlserverppp con=new ConSqlserverppp();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<span style="mso-tab-count: 1">     </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: black; mso-bidi-font-size: 10.5pt">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p> </o:p>
						</span>
				</b>
		</p>
<img src ="http://www.blogjava.net/SINOJAVA/aggbug/40152.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SINOJAVA/" target="_blank">SINOJAVA</a> 2006-04-10 07:16 <a href="http://www.blogjava.net/SINOJAVA/articles/40152.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]JDBC连接大全(SQL Server, ORACLE, MySQL, DB2)</title><link>http://www.blogjava.net/SINOJAVA/articles/40150.html</link><dc:creator>SINOJAVA</dc:creator><author>SINOJAVA</author><pubDate>Sun, 09 Apr 2006 23:11:00 GMT</pubDate><guid>http://www.blogjava.net/SINOJAVA/articles/40150.html</guid><wfw:comment>http://www.blogjava.net/SINOJAVA/comments/40150.html</wfw:comment><comments>http://www.blogjava.net/SINOJAVA/articles/40150.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SINOJAVA/comments/commentRss/40150.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SINOJAVA/services/trackbacks/40150.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接大全</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">(</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">SQL Server, ORACLE, MySQL, DB2</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 115.5pt; mso-char-indent-count: 11.0">
				<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">         引用请注明出处</span>
				<span lang="EN-US" style="COLOR: red; mso-bidi-font-size: 10.5pt">:http//www.blogjava.net/SINOJAVA<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">1.<span style="mso-spacerun: yes">  </span>JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">SQL Server<span style="mso-spacerun: yes">                                      </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下载</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">CLASSPATH=.;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例子：</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">public class ConSqlserver{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>Connection con;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>Statement st;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>ResultSet rs;<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>public ConSqlserver(){<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">        </span>try{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>String name="com.microsoft.jdbc.sqlserver.SQLServerDriver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind;User=user;Password=password"; <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">           </span>
								<span style="mso-spacerun: yes">    </span>Class.forName(name);<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>con=DriverManager.getConnection(url,"user","password");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>con.close();<span style="mso-spacerun: yes">           </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">         </span>}catch(Exception e){<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">               </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">         </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>public static void main(String args[])<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>{<span style="mso-spacerun: yes">    </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">        </span>ConSqlserver cs=new ConSqlserver();<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">    </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">2.JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">ORACLE- -<span style="mso-spacerun: yes">                                       </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">oracle</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自己带</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdbc</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动，具体位置在</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\oracleora92\jdbc\lib\classes12.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">CLASSPATH=.;C:\oracleora92\jdbc\lib\classes12.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例子：</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">public class ConOracle{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Connection con;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Statement st;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>ResultSet rs;<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public ConOracle(){<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>try{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String name="oracle.jdbc.driver.OracleDriver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String url="jdbc:oracle:thin@localhost:1521:database";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>Class.forName(name);<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con=DriverManager.getConnection(url,"user","password");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>
								<span style="mso-spacerun: yes">         </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con.close();<span style="mso-spacerun: yes">           </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}catch(Exception e){<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">   </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public static void main(String args[]){<span style="mso-spacerun: yes">    </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>ConOracle co=new ConOracle();<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">3.JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">MySQL<span style="mso-spacerun: yes">                                     </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下载</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">MySQLJDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">CLASSPATH=.;C:\Program Files\MySQL\mysql-connector-java-3.2.0-alpha\mysql-connector<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">-java-3.2.0-alpha\mysql-connector-java-3.2.0-alpha-bin.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例子：</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">public class ConMysql{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Connection con;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Statement st;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>ResultSet rs;<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public ConMysql(){<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>try{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String name="com.mysql.jdbc.Driver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String url="jdbc:mysql://localhost/database?user=user&amp;password=password";<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>Class.forName(name);<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con=DriverManager.getConnection(url);<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con.close();<span style="mso-spacerun: yes">           </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}catch(Exception e){<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">   </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public static void main(String args[]){<span style="mso-spacerun: yes">    </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>ConMysql cms=new ConMysql();<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">4.</span>
				</b>
				<span lang="EN-US" style="COLOR: blue">
				</span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">JDBC</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">DB2- </span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">-<span style="mso-spacerun: yes">                                       </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">DB2</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自己带</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdbc</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动，具体位置在</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\Program Files\IBM\SQLLIB\java\db2jcc.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cu.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">CLASSPATH=.;C:\ProgramFiles\IBM\SQLLIB\java\db2jcc.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\ProgramFiles\IBM\SQLLIB\java\db2jcc_license_cu.jar;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\ProgramFiles\IBM\SQLLIB\java\db2jcc_license_cisuz.jar<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注意：在使用</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdbc</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">db2</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">时，一定要用</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">ibm</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自己的</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdk</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">否则执行会出现错误，可能是</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">ibm</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdbc</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动和</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">sun</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">jdk</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不兼容的问题</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">      </span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">具体位置在</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">C:\Program Files\IBM\SQLLIB\java\jdk<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例子：</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">import java.sql.*;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">public class ConDB2{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Connection con;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>Statement st;<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>ResultSet rs;<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public ConDB2(){<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>try{ <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String name="com.ibm.db2.jcc.DB2Driver";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>String url="jdbc:db2://localhost:50000/database";<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">         </span>Class.forName(name);<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con=DriverManager.getConnection(url,"user","password");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>System.out.println("</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">!");<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">          </span>con.close();<span style="mso-spacerun: yes">           </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}catch(Exception e){<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">   </span>e.printStackTrace();<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>public static void main(String args[]){<span style="mso-spacerun: yes">    </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes">  </span>ConDB2 cd=new ConDB2();<span style="mso-spacerun: yes">  </span><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<span style="mso-spacerun: yes"> </span>} <o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">}<o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
								<o:p> </o:p>
						</span>
				</b>
		</p>
<img src ="http://www.blogjava.net/SINOJAVA/aggbug/40150.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SINOJAVA/" target="_blank">SINOJAVA</a> 2006-04-10 07:11 <a href="http://www.blogjava.net/SINOJAVA/articles/40150.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]数据库实例(默认实例,命名实例)总结</title><link>http://www.blogjava.net/SINOJAVA/articles/40149.html</link><dc:creator>SINOJAVA</dc:creator><author>SINOJAVA</author><pubDate>Sun, 09 Apr 2006 23:10:00 GMT</pubDate><guid>http://www.blogjava.net/SINOJAVA/articles/40149.html</guid><wfw:comment>http://www.blogjava.net/SINOJAVA/comments/40149.html</wfw:comment><comments>http://www.blogjava.net/SINOJAVA/articles/40149.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SINOJAVA/comments/commentRss/40149.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SINOJAVA/services/trackbacks/40149.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库实例</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">(</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">默认实例</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">,</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">命名实例</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">)</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">总结</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">
								<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 94.5pt; mso-char-indent-count: 9.0">
				<span lang="EN-US" style="COLOR: red; mso-bidi-font-size: 10.5pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 94.5pt; mso-char-indent-count: 9.0">
				<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">引用请注明出处</span>
				<span lang="EN-US" style="COLOR: red; mso-bidi-font-size: 10.5pt">:http//www.blogjava.net/SINOJAVA<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; mso-char-indent-count: 2.0">
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所谓的“实例”，就是一个</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库引擎。</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 2000</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">支持在同一台计算机上同时运行多个</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库引擎实例。每个</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库引擎实例各有一套不为其他实例共享的系统及用户数据库。应用程序连接同一台计算机上的</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库引擎实例的方式与连接其他计算机上运行的</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库引擎的方式基本相同。由于实例各有一套不为其他实例共享的系统及用户数据库，所以各实例的运行是独立的，一个实例的运行不会受其他实例运行的影响，也不会影响其他实例的运行。在一台计算机上安装多个</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例，就相当于把这台计算机模拟成多个数据库服务器，而且这些模拟的数据库服务器是独立且同时运行的。</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 30pt; mso-char-indent-count: 2.5">
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例包括默认实例和命名实例两种。一台计算机上最多只有一个默认实例，也可以没有默认实例，默认实例名与计算机名相同，修改计算机名会同步修改默认实例名（</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 7.0</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只能被安装为默认实例，在修改计算机名后，会导致</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务无法启动，需要执行</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装程序进行自动修复才能解决启动问题），客户端连接默认实例时，将使用安装</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例的计算机名。</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在同一台计算机上安装</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 7.0</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 2000</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">时，由于</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 7.0</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只能安装为默认实例，所以应该先安装</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 7.0</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，将</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 2000</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装为命名实例。或者在安装</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">SQL Server 2000</span>
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的时候，指定安装为命名实例。</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 30pt; mso-char-indent-count: 2.5">
				<span style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一台计算机上可以安装多个命名实例，客户端连接命名实例时，必须使用以下计算机名称与命名实例的实例名组合的格式：</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">computer_name\instance_name<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 2.0; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">实例主要应用于数据库引擎及其支持组件，而不应用于客户端工具。如果安装了多个实例，则每个实例都将获得各自唯一的一套：<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">系统和用户数据库。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">SQL Server </span>
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">和<span lang="EN-US"> SQL Server </span>代理服务。对于默认实例，服务名仍为<span lang="EN-US"> MSSQLServer </span>和<span lang="EN-US"> SQLServerAgent</span>。对于命名实例，服务名改为<span lang="EN-US"> MSSQL$<i>instancename</i></span>和<span lang="EN-US"> SQLAgent$<i>instancename</i></span>，使得这些服务与服务器上的其它实例分开启动和停止。可使用相关联的<span lang="EN-US"> SQL Server </span>服务启动和停止不同实例的数据库引擎。<span lang="EN-US">SQL Server </span>代理服务管理相关联的数据库引擎实例的调度事件。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">与数据库引擎、<span lang="EN-US">SQL Server </span>和<span lang="EN-US"> SQL Server </span>代理服务相关联的注册表键。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">使应用程序能连接特定实例的网络连接地址。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
		</ul>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 11.8pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: .98; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 5" align="left">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">实例<span style="mso-bidi-font-weight: bold">共享组件<span lang="EN-US">:<o:p></o:p></span></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 1.0; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">以下组件可由运行于同一台计算机上的所有实例共享：<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">此计算机上只有一个<span lang="EN-US"> SQL Server 2000 </span>程序组<span lang="EN-US"> (Microsoft SQL Server)</span>，以及由该程序组中的每个图标表示的唯一一个实用工具的复本。唯一一个<span lang="EN-US"> SQL Server </span>联机丛书的复本。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
		</ul>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">程序组中的实用工具版本来自计算机上最先安装的<span lang="EN-US"> SQL Server 2000 </span>版本。例如，如果将<span lang="EN-US"> SQL Server 2000 </span>简体中文版作为默认实例安装，然后将<span lang="EN-US"> SQL Server 2000 </span>美国英语版作为命名实例安装，则只有一个<span lang="EN-US"> SQL Server 2000 </span>程序组。该程序组中的所有实用工具图标和<span lang="EN-US"> SQL Server </span>联机丛书图标都将启动简体中文版的工具。<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">所有<span lang="EN-US"> SQL Server 2000 </span>实用工具都能处理多个实例。可以从一个<span lang="EN-US"> SQL Server 2000 </span>服务管理器的复本启动和停止每个实例。可使用一个<span lang="EN-US"> SQL Server 2000 SQL Server </span>企业管理器复本控制计算机上所有实例中的对象，使用一个<span lang="EN-US"> SQL Server 2000 </span>服务器网络管理器复本管理计算机上所有实例的网络通讯地址。<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">仅有一个<span lang="EN-US"> MSSearchService </span>复本管理针对计算机上所有<span lang="EN-US"> SQL Server </span>实例的全文检索。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">English Query </span>
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">和<span lang="EN-US"> Microsoft SQL Server 2000 Analysis Services </span>服务器都只有一个复本。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; mso-margin-top-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">与客户端软件相关联的注册表键在实例间不重复。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">只有一个<span lang="EN-US"> SQL Server </span>开发库（包括<span lang="EN-US"> *.lib </span>文件）和示例应用程序的复本。<span lang="EN-US"><o:p></o:p></span></span>
				</li>
		</ul>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
<img src ="http://www.blogjava.net/SINOJAVA/aggbug/40149.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SINOJAVA/" target="_blank">SINOJAVA</a> 2006-04-10 07:10 <a href="http://www.blogjava.net/SINOJAVA/articles/40149.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]JDBC如何连接SQL SERVER 2000命名实例的调试全过程</title><link>http://www.blogjava.net/SINOJAVA/articles/40148.html</link><dc:creator>SINOJAVA</dc:creator><author>SINOJAVA</author><pubDate>Sun, 09 Apr 2006 23:09:00 GMT</pubDate><guid>http://www.blogjava.net/SINOJAVA/articles/40148.html</guid><wfw:comment>http://www.blogjava.net/SINOJAVA/comments/40148.html</wfw:comment><comments>http://www.blogjava.net/SINOJAVA/articles/40148.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SINOJAVA/comments/commentRss/40148.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SINOJAVA/services/trackbacks/40148.html</trackback:ping><description><![CDATA[
		<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center">
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">[</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 14pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">原创</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: blue">]</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">JDBC</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 14pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何连接</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">SQL SERVER 2000</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 14pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">命名实例的调试全过程</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 14pt; COLOR: red">
										<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
										<o:p>
										</o:p>
								</span>
						</b>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 5cm; mso-char-indent-count: 13.5">
						<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 94.5pt; mso-char-indent-count: 9.0">
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">引用请注明出处</span>
								<span lang="EN-US" style="COLOR: blue; mso-bidi-font-size: 10.5pt">:http//www.blogjava.net/SINOJAVA<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="COLOR: red">
										<o:p>
												<font size="3"> </font>
										</o:p>
								</span>
						</b>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">(</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">) </span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">整个操作及出错简要介绍</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">:<o:p></o:p></span>
						</b>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<span lang="EN-US" style="COLOR: blue">
								<font size="3">
										<span style="mso-spacerun: yes">  </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 5.25pt; TEXT-INDENT: 5.25pt; mso-char-indent-count: .5; mso-para-margin-left: .5gd">
						<font size="3">
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我用微软提供的</span>
								<span lang="EN-US" style="COLOR: black">JDBC</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动程序来连接</span>
								<span lang="EN-US" style="COLOR: black">,</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我机子</span>
								<span lang="EN-US" style="COLOR: black">SQL SERVER2000</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装时创建的是新的</span>
								<span lang="EN-US" style="COLOR: black">SQL SERVER2000</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">命名实例</span>
								<span lang="EN-US" style="COLOR: black">(</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">没有安装</span>
								<span lang="EN-US" style="COLOR: black">SQL Server 2000 </span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库默认实例</span>
								<span lang="EN-US" style="COLOR: black">),</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将</span>
								<span lang="EN-US" style="COLOR: black">jdbc</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装</span>
								<span lang="EN-US" style="COLOR: black">,</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置好以后开始连接数据库</span>
								<span lang="EN-US" style="COLOR: black">,</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我使用的连接语句如下</span>
								<span lang="EN-US" style="COLOR: black"> (</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我已经装了</span>
								<span lang="EN-US" style="COLOR: black">SP3</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">补丁</span>
								<span lang="EN-US" style="COLOR: black">) </span>
								<span lang="EN-US" style="COLOR: black; FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings">
										<span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">L</span>
								</span>
								<span lang="EN-US" style="COLOR: black">
										<o:p>
										</o:p>
								</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">try<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>{<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>String driver="com.microsoft.jdbc.sqlserver.SqlServerDriver";<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 5.25pt; TEXT-INDENT: 5.25pt; mso-char-indent-count: .5; mso-para-margin-left: .5gd">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind;";<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>Class.forName(driver);<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>con =DriverManager.getConnection(url,"sa","zhaopf");<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<font size="3">
								<span lang="EN-US" style="COLOR: black">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">  </span>
										<span style="mso-spacerun: yes">  </span>System.out.println("</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
								<span lang="EN-US" style="COLOR: black">!");<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<span style="mso-spacerun: yes">    </span>con.close();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>}<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">catch(Exception e)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>{<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 3">                  </span>e.printStackTrace();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">           </span>}<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<font size="3">
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行程序后出现如下错误提示</span>
								<span lang="EN-US" style="COLOR: black">:<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">E:\Java\eclipse&gt;java ConSqlserver<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">java.lang.ClassNotFoundException: com.microsoft.jdbc<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">       </span>
										<span style="mso-spacerun: yes"> </span>at java.net.URLClassLoader$1.run(Unknown Sou<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">  </span>
										<span style="mso-spacerun: yes">     </span>
										<span style="mso-spacerun: yes"> </span>at java.security.AccessController.doPrivileg<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.net.URLClassLoader.findClass(Unknown<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.ClassLoader.loadClass(Unknown S<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at sun.misc.Launcher$AppClassLoader.loadClas<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">      </span>
										<span style="mso-spacerun: yes"> </span>
										<span style="mso-spacerun: yes"> </span>at java.lang.ClassLoader.loadClass(Unknown S<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.ClassLoader.loadClassInternal(U<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.Class.forName0(Native Method)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.Class.forName(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">      </span>
										<span style="mso-spacerun: yes"> </span>
										<span style="mso-spacerun: yes"> </span>at ConSqlserver.&lt;init&gt;(ConSqlserver.java:19)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at ConSqlserver.main(ConSqlserver.java:40)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 12.05pt; mso-char-indent-count: 1.0">
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">(</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">) </span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">调试过程如下</span>
						</b>
						<b style="mso-bidi-font-weight: normal">
								<span lang="EN-US" style="FONT-SIZE: 12pt; COLOR: blue">:<o:p></o:p></span>
						</b>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(1)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">排除</span>
								<span lang="EN-US" style="COLOR: blue">jdbc</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动出错</span>
								<span lang="EN-US" style="COLOR: blue">:</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将配置</span>
								<span lang="EN-US" style="COLOR: blue">jdbc</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动的环境变量删除后运行</span>
								<span lang="EN-US" style="COLOR: blue">,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">显示的错误信息如下</span>
								<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">  </span>E:\Java\eclipse&gt;java ConSqlserver<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0; mso-para-margin-left: .57gd">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.net.URLClassLoader$1.run(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.security.AccessController.doPrivileged(Native Method)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.net.URLClassLoader.findClass(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.ClassLoader.loadClass(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.ClassLoader.loadClass(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.ClassLoader.loadClassInternal(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.Class.forName0(Native Method)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at java.lang.Class.forName(Unknown Source)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at ConSqlserver.&lt;init&gt;(ConSqlserver.java:37)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">        </span>at ConSqlserver.main(ConSqlserver.java:60)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<font size="3">
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">故</span>
								<span lang="EN-US" style="COLOR: black">:</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">排除是</span>
								<span lang="EN-US" style="COLOR: black">jdbc</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动安装的问题</span>
								<span lang="EN-US" style="COLOR: black">
										<o:p>
										</o:p>
								</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(2)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">排除</span>
								<span lang="EN-US" style="COLOR: blue">SQL SERVER</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装问题</span>
								<span lang="EN-US" style="COLOR: blue">,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重新安装</span>
								<span lang="EN-US" style="COLOR: blue">SQL SERVER 2000,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">此次安装选用</span>
								<span lang="EN-US" style="COLOR: blue">SQL SERVER2000</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的默认实例</span>
								<span lang="EN-US" style="COLOR: blue">,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还用上述的连接代码段</span>
								<span lang="EN-US" style="COLOR: blue">,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后继续调试程序成功</span>
								<span lang="EN-US" style="COLOR: blue">,</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行显示</span>
								<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: blue">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<font size="3">
								<span lang="EN-US" style="COLOR: blue">
										<span style="mso-spacerun: yes">   </span>
								</span>
								<span lang="EN-US" style="COLOR: black">E:\Java\eclipse&gt;java ConSqlserver<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt; TEXT-INDENT: 84pt; mso-char-indent-count: 8.0; mso-para-margin-left: .57gd">
						<font size="3">
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
								<span lang="EN-US" style="COLOR: black">!<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(3)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">确认数据库的安装中创建实例概念模糊</span>
								<span lang="EN-US" style="COLOR: blue">
										<o:p>
										</o:p>
								</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(4)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">彻底弄清</span>
								<span lang="EN-US" style="COLOR: blue">SQL SERVER 2000</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的默认实例与命名实例的含义</span>
								<span lang="EN-US" style="COLOR: blue">
										<o:p>
										</o:p>
								</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(5)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重新查找关于</span>
								<span lang="EN-US" style="COLOR: blue">SQL SERVER 2000 JDBC</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的帮助文档</span>
								<span lang="EN-US" style="COLOR: blue">,<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: blue">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查得资料如下</span>
								<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: blue">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">Microsoft SQL Server 2000 supports multiple instances of a SQL Server database running <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3">
										</font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">concurrently on the same server. An instance is identified by an instance name. <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">To connect to a named instance using a connection URL, use the following URL format: <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">jdbc:microsoft:sqlserver://server_name\\instance_name<span style="mso-spacerun: yes">  </span><o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">NOTE: The first backslash character (\) in \\instance_name is an escape character. <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">where: <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">server_name is the IP address or hostname of the server. <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">instance_name is the name of the instance to which you want to connect on the server. <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">For example, the following connection URL connects to an instance named instance1 on <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3">
										</font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">server1: <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">jdbc:microsoft:sqlserver://server1\\instance1;User=test;Password=secret <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">To connect to a named instance using a data source, specify the ServerName connection <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3">
										</font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">property as described in the "Connection String Properties" topic.<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt">
						<span lang="EN-US" style="COLOR: black">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-spacerun: yes">    </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 28.5pt; TEXT-INDENT: -22.5pt; mso-list: l0 level1 lfo1; tab-stops: list 28.5pt">
						<span lang="EN-US" style="COLOR: blue; mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font size="3">(6)</font>
										<span style="FONT: 7pt 'Times New Roman'">       </span>
								</span>
						</span>
						<font size="3">
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重新修改连接代码如下</span>
								<span lang="EN-US" style="COLOR: blue">:<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: blue">
								<o:p>
										<font size="3"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">try<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>{<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>//String driver="com.microsoft.jdbc.sqlserver.SqlServerDriver";<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>String url="jdbc:microsoft:sqlserver://SINOIT\\SINOSERVER;DatabaseName=Northwind";<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); <o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 3">                   </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>//Class.forName(driver);//.newInstance();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>con =DriverManager.getConnection(url,"sa","zse");<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>//st=con.createStatement();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<font size="3">
								<span lang="EN-US" style="COLOR: black">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>System.out.println("</span>
								<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接成功</span>
								<span lang="EN-US" style="COLOR: black">!");<o:p></o:p></span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<span style="mso-spacerun: yes">    </span>con.close();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>
										<o:p>
										</o:p>
								</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>}<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>catch(Exception e)<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>{<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 3">                   </span>e.printStackTrace();<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<span lang="EN-US" style="COLOR: black">
								<font size="3">
										<span style="mso-tab-count: 2">            </span>}<o:p></o:p></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 6pt">
						<font size="3">
								<span lang="EN-US" style="COLOR: blue">(7)</span>
								<span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">经测试连接成功</span>
						</font>
						<span lang="EN-US" style="COLOR: blue">
								<o:p>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center">
				</p>
		</span>
<img src ="http://www.blogjava.net/SINOJAVA/aggbug/40148.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SINOJAVA/" target="_blank">SINOJAVA</a> 2006-04-10 07:09 <a href="http://www.blogjava.net/SINOJAVA/articles/40148.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>