安装和使用MS SQL JDBC驱动程序? [英] Installing and using MS SQL JDBC Driver?

查看:198
本文介绍了安装和使用MS SQL JDBC驱动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的本地工作站上运行的MS SQL Server实例安装JDBC驱动程序。此 http://support.microsoft.com/kb/313100 链接会启动入门教程与JDBC。但是它要求我配置以下四个env变量: -


  1. \安装路径\Lib\Msbase.jar

  2. \安装路径\Lib\Msutil.jar

  3. \安装路径\Lib\Mssqlserver.jar

以上三个文件都没有从Microsoft站点下载的标准JDBC驱动程序。我尝试从不同的位置手动下载这些jar,但它们都已被删除。它看起来像是非常古老,不再使用。



我想知道如果我仍然需要这些jars和env变量指向他们为我使用JDBC驱动程序用于连接到本地MS SQL Server实例?



如果回答此问题,我在哪里可以找到它们?



感谢。

解决方案

使用Microsoft JDBC驱动程序4.0。在此下载适用于SQL Server的Microsoft JDBC驱动程序4.1

在项目设置中将sqljdbc4.jar添加到类路径


I am trying to install JDBC Drivers for MS SQL Server instance running on my local workstation. This http://support.microsoft.com/kb/313100 link starts a tutorial on getting started with JDBC. However it asks me to configure the following four env variables:-

  1. \Your installation path\Lib\Msbase.jar
  2. \Your installation path\Lib\Msutil.jar
  3. \Your installation path\Lib\Mssqlserver.jar

None of the above three files comes with standard JDBC driver download from Microsoft site. I tried downloading these jars manually from different locations, however they all have been removed. It just looks like these are very old and no longer used.

I was wondering if I still need these jars and env variables pointed to them for me to use the JDBC drivers for connecting to local MS SQL Server instance?

If answer to this question where can I find them?

Thanks.

解决方案

Use Microsoft JDBC Driver 4.0. Download here Microsoft JDBC Driver 4.0 for SQL Server

add sqljdbc4.jar to classpath in your project settings

这篇关于安装和使用MS SQL JDBC驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆