码迷,mamicode.com
首页 > 数据库 > 详细

【J2EE】Java连接SQL Server2000问题:com.

时间:2014-07-28 15:28:13      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:style   java   color   os   strong   io   问题   cti   

1、问题现象

E:\JSP\HibernateDemo\HibernateDemoProject\src\sine>java ConnectSQLServer
Connect failed!
com.microsoft.sqlserver.jdbc.SQLServerException: 用户 ‘sa‘ 登录失败。该用户与可信 SQL Server 连接无关联。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ConnectSQLServer.main(ConnectSQLServer.java:15)

2、解决方法

 

【J2EE】Java连接SQL Server2000问题:com.,布布扣,bubuko.com

【J2EE】Java连接SQL Server2000问题:com.

标签:style   java   color   os   strong   io   问题   cti   

原文地址:http://www.cnblogs.com/wintergrass/p/3872971.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!