问题:[SQLServer 2000 Driver for JDBC][SQLServer]传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 1 (""): 数据类型 0x38 未知
解决方法:
下载sql 2005 驱动:
[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=E22BC83B-32FF-4474-A44A-22B6AE2C4E17&displaylang=zh-cn[/url]
修改1:
修改2:
如:
参考链接:[url]http://support.microsoft.com/?scid=kb%3Ben-us%3B915834&x=15&y=16[/url]
解决方法:
下载sql 2005 驱动:
[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=E22BC83B-32FF-4474-A44A-22B6AE2C4E17&displaylang=zh-cn[/url]
修改1:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // 2000 version
修改2:
Connection con = DriverManager.getConnection("jdbc:sqlserver://<ServerName>;user=<UserName>;password=<Password>");//2005 version
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://<ServerName>;user=<UserName>;password=<Password>");//2000 version
如:
//SQL2005 version
connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection.url=jdbc:sqlserver://localhost:1433;DatabaseName=Hello
参考链接:[url]http://support.microsoft.com/?scid=kb%3Ben-us%3B915834&x=15&y=16[/url]