15分买一判断呀! 你好,bobokong(寻找编程的乐趣) 你也在呀,能帮我解决一下么 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 大家帮我解决一下呀:就是这段有问题呀,int iOK=oEreport.executeUpdate(out);//这个地方好像不对但我不知该怎么改呀, if(iOK==1){ JOptionPane.showMessageDialog(null, "保存成功!", "恭喜成功!",JOptionPane.INFORMATION_MESSAGE); } else{ JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE); } oEreport.executeUpdate(out)这种好像只对sql语句有用吧 out.write( text );out.close();这两句话执行以后,如果没有抛错,应该存盘成功了试一试这样吧,将提示错误的信息放在catch中... out.write( text ); out.close(); // Display the name of the saved directory+file in the statusBar. System.out.println( currFileName ); //int iOK=oEreport.executeUpdate(out); if (currFileName.isExist()) JOptionPane.showMessageDialog(null, "保存成功!", "恭喜成功!",JOptionPane.INFORMATION_MESSAGE); else JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE); } catch (IOException el) { el.printStackTrace(); JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE); }... lz这种情况还有没有更高效的处理方法? [提问]用java写浏览器简单吗? 企业中的Swing 控件主要是用来做什么的 [SWING]JComboBox问题 怎样替换java里原有的类? JAVA中怎么得到系统屏幕的总宽度和长度?在线等,先谢了!!!!! java消费者生产者问题 怎样使用Runtime的exec(String command)的函数? 序列化问题 SOS!!!!-------在什么地方下载到Jbuilder5啊?? 各位老哥帮帮忙,这个问题。。。呵,呵,我不懂! Application的参数在jdk1.3的命令行下如何设定?
就是这段有问题呀,
int iOK=oEreport.executeUpdate(out);//这个地方好像不对但我不知该怎么改呀,
if(iOK==1){
JOptionPane.showMessageDialog(null, "保存成功!", "恭喜成功!",JOptionPane.INFORMATION_MESSAGE);
}
else{
JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE);
}
这种好像只对sql语句有用吧
out.close();
这两句话执行以后,如果没有抛错,应该存盘成功了
试一试这样吧,将提示错误的信息放在catch中
.
.
.
out.write( text );
out.close();
// Display the name of the saved directory+file in the statusBar.
System.out.println( currFileName );
//int iOK=oEreport.executeUpdate(out);
if (currFileName.isExist())
JOptionPane.showMessageDialog(null, "保存成功!", "恭喜成功!",JOptionPane.INFORMATION_MESSAGE);
else
JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE);
}
catch (IOException el) {
el.printStackTrace();
JOptionPane.showMessageDialog(null, "保存失败!", "错误失败!", JOptionPane.ERROR_MESSAGE);
}
.
.
.