传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确

WORKAROUND

To work around this problem, follow these steps:
1. Load the SQL Server 2005 Driver for JDBC before you load the SQL Server 2000 Driver for JDBC. To do this, use the DriverManager class as in the following code example.



Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // 2000 version


2. Use a SQL Server 2005 Driver for JDBC connection URL to establish a connection. To do this, use code that resembles the following code example.


Connection con = DriverManager.getConnection("jdbc:sqlserver://<ServerName>;user=<UserName>;password=<Password>");




// my opinion:
SQL2005
drivers=com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection.url=jdbc:sqlserver://localhost:1433;DatabaseName=Jnews





posted on 2007-12-26 15:18  Squall  阅读(1404)  评论(0编辑  收藏  举报

导航