在线用户    站点地图 技术论坛 文档中心 站点导航 资源下载 语言参考 教程专题 站点统计 业务项目 使用帮助
您的位置
MSDN参考新加了CSS2参考,全中文,制作精良。245k下载。           新加了sxf_sxf推荐的"动态网页专家指导" 下载!          新加了lsg2002lsg推荐的"ASP.NET高级编程(PDF)" 下载!          新加了DHTML代码预览!!,功能强大哦!欢迎试用          新加了网友lincong为大家提供的SQL Server 2000 程序员指南,有点大,但同时也就说明内容全咯!           新加了网友ibra为大家提供的北大的JAVA课件,很适合初学者入门           新加了一个java的连接缓冲池代码示例           新加了人月神话电子版下载!软件工程巨著哦~~           更新了评分标准,引入了“专家分”概念,相信可以更好的激励大家的学习!详情请看“使用帮助”           新加了由网友GGG提供的“IIS超级管理手册”,值得一看哦!(虽然我没看过 :P )           新加了“英雄榜”,欢迎测试!           “无组件上传·从原理剖析到实践”已经全部完成,源码全部开放,有兴趣的朋友请到文档中心一探究竟。  您的位置  首页>文档中心>JAVA>文档A0000757 在同一窗口中打开页面中的链接 在新窗口中打开页面中的链接 将ASPCHINA设为首页 将ASPCHINA加入书签    
 LOGIN HERE
用户:
密码: 忘记密码
记住密码 用户注册 游客进入
相关文章

SqlServer数据库的备份和恢复措施

将数据库(access)升级为sqlserver需要注意的问题

在2003下用JDBC访问本机MS SQL

通过JDBC操纵Oracle数据库LOB字段的几种情况分析

不建立系统DSN,通过JDBCODBC bridge连接数据库

不用odbc成功连接sqlserver

SQLSERVER 2000的JDBC驱动

SQL Server 2000 程序员指南

ADO连接数据库字符串大全(VP,Excel,文本,Sybase,.NET等)

一个连接池的实现
发表文章
jTDS mssqlserver/sybase 10 JDBC 驱动下载(最好的mssqlserver jdbc driver)

作者:miles     提交人:miles     发布时间:04-05-19     文章类型:原创     浏览量:6381
参考链结:http://jtds.sourceforge.net/    
关键字:sqlserver|sybase|jdbc|driver
[本文档包含附件:jtds-0.8-rc1.jar]
字体:    视力保护色: 杏仁黄  秋叶褐  胭脂红  芥末绿  天蓝  雪青  灰  银河白(默认色) [A0000757]

参看附件下载

优点:
1。open souce(GNU LGPL),成本低廉;
2。type 4,纯java,所以应用方便;
3。功能丰富而且稳定,甚至支持jdbc3.0一些features。

关于3,的确不是吹牛哦。。他比ms提供的jdbc driver for sqlserver2000稳定的多,而且功能也强。深有体会啊。。。。。

用法:
driver=net.sourceforge.jtds.jdbc.Driver
url=jdbc:jtds:sqlserver://localhost:1433/pubs
username=sa
password=xxx

不多说啦。

Overview

jTDS is an open source 100% pure Java (type 4) JDBC 2.1 driver for the Microsoft SQL Server series (6.5, 7.x and 2000) and Sybase 10. jTDS is based on the work of the FreeTDS project and is currently the fastest complete JDBC driver for SQL Server and Sybase. Starting with release 0.7.1 jTDS is 100% JDBC 2.1 compatible, supporting forward-only and scrollable/updateable ResultSets, multiple concurrent (completely independent) Statements per Connection and implementing all of the DatabaseMetaData and ResultSetMetaData methods. A number of JDBC 3.0 features (such as retrieval of generated keys) are also implemented.

Quite a few of the commercial JDBC drivers out there are based on jTDS (or FreeTDS), even if they no longer acknowledge this. jTDS has been tested with virtually all of the available JDBC-based database management tools and is the driver of choice for most of these (DataDino and Aqua Data Studio even contain it). jTDS is also becoming a common choice for enterprise-level applications: starting with release 0.8-rc1 jTDS passes the Hibernate test suite, making it the driver of choice for SQL Server.

Getting Started

Being a type 4 driver, jTDS does not need any special installation. Just drop the jar file into your application's classpath and you're done. All you need to know is the name of the Driver and DataSource implementations and the URL format and you're all set. You can get these and a lot more information from the Frequently Asked Questions page.

Why use jTDS?

Umm, good question... Let's see... Well, first of all because it's open source. jTDS is released under the GNU LGPL, giving you not only the opportunity to tweak it to your own liking but also the right to get any improvement anyone ever brings to jTDS. Plus your money back. ;o)

You'll say there are other free choices... There's the JDBC-ODBC bridge and Microsoft's own JDBC driver... Well yes, but both of them crash on you every now and then, just to keep you on your toes, and lack functionality. Indeed jTDS more stable than any of the two. Just do a Google search for jTDS and you'll find posts from a lot of people moving to jTDS because of stability issues.

Oh, and did we mention that jTDS is faster? Well it's not just faster, it's the fastest. Of all the SQL Server drivers. Including commercial ones. Well, this seems to have caught your attention. We don't have any benchmark of our own, we use those of the competition. And here are the results of i-net software's BenchTest 2.1 for MS SQL Server and JNetDirect's JDBC Performance Benchmark.

Anyway, just give it a try. Get the latest one from here and see if you like it or not.

ps.提供一段完整的连接代码:
//前面需要import java.sql.*那些东西别忘记了
Connection conn = null;

try {
  Class.forName("net.sourceforge.jtds.jdbc.Driver");
  Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/pubs", "sa", "sa的密码");
} catch (SQLException ex) {
  ex.printStackTrace();
  conn = null;
} catch (ClassNotFoundException ex) {
  ex.printStackTrace();
  conn = null;
}

if(conn!=null) { //成功!
  System.out.println("success!!!!!");
} else { //失败。。。
  System.out.println(".......");
}

关于这篇文章的评论 [注意:这里仅仅是给大家提供了一个发表对文章本身看法的地方,如果有疑问,请到论坛提出] 我要提问!
标题
内容
发言
*您尚未以注册用户身份登录,不能发表评论。这里登录
您的位置
  (c)2000-2020 Yup Studio, all rights reserved.  
201.1719