`
hulianwang2014
  • 浏览: 689659 次
文章分类
社区版块
存档分类
最新评论
  • bcworld: 排版成这样,一点看的欲望都没有了
    jfinal

传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 1 (""): 数据类型 0x38 未知。 (

 
阅读更多
今天将一个SQL2000备份的bak还原到SQL2005进行连接,抛出异常如下:

<wbr><wbr><wbr><span></span>java.sql.SQLException: [Microsoft][<em style="font-style:italic">SQLServer</em><span></span>2000 Driver for JDBC][<em style="font-style:italic">SQLServer</em>]传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 1 (""): 数据类型 0x38 未知。</wbr></wbr></wbr>

<wbr><wbr><wbr><span></span>最后解决办法:</wbr></wbr></wbr>

<wbr><wbr><wbr><span></span>1.下载SQL2005驱动包,链接地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=E22BC83B-32FF-4474-A44A-22B6AE2C4E17&amp;displaylang=zh-cn</wbr></wbr></wbr>

<wbr><wbr><wbr><span></span>2.解压后,将sqljdbc.jar拷贝到项目lib目录下,build path。</wbr></wbr></wbr>

<wbr></wbr>

修改1:

  1. Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");<wbr>//<wbr>2005<wbr>version <wbr><wbr></wbr></wbr></wbr></wbr></wbr>
  2. Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");<wbr>//<wbr>2000<wbr>version<wbr><wbr></wbr></wbr></wbr></wbr></wbr>


修改2:

  1. Connection<wbr>con<wbr>=<wbr>DriverManager.getConnection(</wbr></wbr></wbr>"jdbc:sqlserver://<ServerName>;user=<UserName>;password=<Password>");//2005<wbr>version <wbr><wbr></wbr></wbr></wbr>
  2. Connection<wbr>con<wbr>=<wbr>DriverManager.getConnection(</wbr></wbr></wbr>"jdbc:microsoft:sqlserver://<ServerName>;user=<UserName>;password=<Password>");//2000<wbr>version<wbr><wbr></wbr></wbr></wbr>



如:

  1. //SQL2005<wbr>version <wbr><wbr></wbr></wbr></wbr>
  2. connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver <wbr><wbr></wbr></wbr>
  3. Connection.url=jdbc:sqlserver://localhost:1433;DatabaseName=Hello<wbr></wbr>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics