代码如下:
int num=0;
while(当某条件满足时){
try{
num++;
String sql="insert into QC.FTP (key,pass,stime,ip,stan) values('q','q','q','q',"+new Integer(num).toString()+")"; stmt.executeUpdate(sql);
}catch(Exception e){
continue;
}}上述循环执行第一次时能够成功执行insert语句,但是执行第二次循环时报错:SQL命令未正确结束。但是把上述sql语句放到SQL plus里面依次执行则没有问题,请问是哪里出了问题啊?
int num=0;
while(当某条件满足时){
try{
num++;
String sql="insert into QC.FTP (key,pass,stime,ip,stan) values('q','q','q','q',"+new Integer(num).toString()+")"; stmt.executeUpdate(sql);
}catch(Exception e){
continue;
}}上述循环执行第一次时能够成功执行insert语句,但是执行第二次循环时报错:SQL命令未正确结束。但是把上述sql语句放到SQL plus里面依次执行则没有问题,请问是哪里出了问题啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货