定义一个全局变量static ResultSet rs1 = null;
然后,
while ( rs.next()) {
int ID=rs.getInt("ID");
byteArray=rs.getBytes("File_Bit");
senderID = rs.getString("SendID");
recipientID = rs.getString("ReceiveID");
targetType = rs.getString("MobileType");
smil = readfile(smilName);
gif = byteArray;
doUpload();
strSQL = "update [File] set Is_Send=0 where ID="+ID+"";
System.out.println(strSQL);
stmt1.executeUpdate(strSQL);
System.out.println("OK!!");
}
if(rs.equals(rs1)){
try {
Thread.sleep(5000);
}
catch (InterruptedException ex) {
}
}
rs.close();
不知道行不行,试试吧!
然后,
while ( rs.next()) {
int ID=rs.getInt("ID");
byteArray=rs.getBytes("File_Bit");
senderID = rs.getString("SendID");
recipientID = rs.getString("ReceiveID");
targetType = rs.getString("MobileType");
smil = readfile(smilName);
gif = byteArray;
doUpload();
strSQL = "update [File] set Is_Send=0 where ID="+ID+"";
System.out.println(strSQL);
stmt1.executeUpdate(strSQL);
System.out.println("OK!!");
}
if(rs.equals(rs1)){
try {
Thread.sleep(5000);
}
catch (InterruptedException ex) {
}
}
rs.close();
不知道行不行,试试吧!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货