怎么连接sql server,不用jdbc:odbc桥

xingxing 2002-12-13 05:14:06
怎么连接sql server,不用jdbc:odbc桥
...全文
47 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
longzhijian 2002-12-13
  • 打赏
  • 举报
回复
如果用JRUN可以用自带的JDBC比较方便
merlin45 2002-12-13
  • 打赏
  • 举报
回复
http://msdn.microsoft.com/MSDN-FILES/027/001/779/JDBCRTMReleaseMa
nifest.htm


1. Download theMicrosoft SQL Server 2000 Driver for JDBC (setup.exe file) from
the Microsoft MSDN Web site at
http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/
sample.asp?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml.
Save the file in a temporary directory on your local computer.
2. Run setup.exe from the temporary directory and follow the instructions on the
screen.
3. Add the path to the following files to your CLASSPATH:
" install_dir/lib/msbase.jar
" install_dir/lib/msutil.jar
" install_dir/lib/mssqlserver.jar
Where install_dir is the folder in which you installed the driver. For
example:
set CLASSPATH=install_dir\lib\msbase.jar;
install_dir\lib\msutil.jar;install_dir\lib\mssqlserver.jar;
%CLASSPATH%



DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
URL="jdbc:microsoft:sqlserver://lcdbnt4:1433"
conning333 2002-12-13
  • 打赏
  • 举报
回复
使用jdbc来进行连接就可以了
masterz 2002-12-13
  • 打赏
  • 举报
回复
Microsoft SQL Server 2000 Driver for JDBC
(http://www.microsoft.com/downloads/release.asp?releaseid=38312)
masterz 2002-12-13
  • 打赏
  • 举报
回复
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://192.168.0.9:1433;user=sa;password=sa;DatabaseName=testDb");

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧