end of stream was detected on a read
public class Select{
public static void main(String args[]){
ResultSet result;
try{
Connection con;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=onLineTest","sa","1422");
Statement stat = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
result = stat.executeQuery("select * from Teacher");
while(result.next())
{
System.out.println(result.getString(1));
}
}
catch(Exception e)
{
System.out.println("Error"+e);
}
}
}
我在将JAVA和SQL Server 2000连接时出现了“end of stream was detected on a read”这个问题,前几天,我在做的时候JAVA和SQL Server 2000连接都还成功,数据也调出来了,不知怎的,就这几天连接忽然出现问题。我在网上也查找了这个问题的解法,可是都不太清楚,最终我还是没连接起来,如果通过ODBC和SQL Server 2000连接能连接成功,但如果直接连接就会出现这个问题!
我很多软件都装成功了:
JDK 1.5
SQL Server 2000
Tomcat 5
SQL2000-KB884525-SP4-x86-CHS
SQL Server jdbc 驱动
还有端口号也是跟SQL Server 2000端口号一样(1433)
ClassPath、TomcatHome、JAVA_HOME等环境变量都没问题。
麻烦哪位高手,帮我看看大概是什么问题?非常感谢!
相关推荐
node.js中的emitter.on方法使用说明
主要介绍了node.js中的emitter.on方法使用说明,本文介绍了emitter.on的方法说明、语法、接收参数、使用实例和实现源码,需要的朋友可以参考下
Large capacity data hiding combined with secure-intra-watennarking based on H.264/AVC
In this study, a method of using the watermark to enhance the security of the data hiding is proposed for H.264/AVC. The DCT coefficients in Intra-frames are modified to embed the watermark while the secrete information is inserted by modulating the appropriate MVD in P and B frames. The introduced Intra-watermarking, on one hand, can authenticate the integrity of the video stream. Furthermore, by the detected Intra-watermark and its integrity, the receiver can determine the reliability of the e
Signal Processing: Image Communication
Signal Processing: Image Communication
条码:网站
条码 网站
snort规则库
snort规则库,好用的东东哦。我找了很久的。


