亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如下所示,頁面顯示:服務器遇到一個內部錯誤 (), 無法完成此請求?

如下所示,頁面顯示:服務器遇到一個內部錯誤 (), 無法完成此請求?

蠱毒傳說 2023-01-12 19:15:39
public void insertNewCurrency_Rate(Rate_setInfo info)throws RemoteException{  Connection con = null;PreparedStatement ps = null;StringBuffer strBuff = new StringBuffer();//try{con = Database.getConnection();//啟動數據庫 //下一行鏈接數據庫表String control=" insert into currency_set(tseffectivedate,sbasecurrency,scurrencyunit,sinputusername,tsinputdate,lcurrencyrate,scurrency)values('"+info.getTsEffectiveDate()+"','"+info.getSBaseCurrency()+"','"+info.getSCurrencyUnit()+"','"+info.getSInputUsername()+"','"+info.getTsInputDate()+"','"+info.getLCurrencyRate()+"','"+info.getSCurrency()+"'";ps = con.prepareStatement(control.toString());ps.executeUpdate();//關閉資源ps.close();ps = null;con.close();con = null;}catch (Exception e){e.printStackTrace();throw new RemoteException(e.getMessage());}finally{try{if (ps != null)ps.close();if (con != null)con.close();}catch (Exception ex){throw new RemoteException(ex.getMessage());}}}
查看完整描述

1 回答

?
陪伴而非守候

TA貢獻1757條經驗 獲得超8個贊

將“//關閉資源
ps.close();
ps = null;
con.close();
con=null;“ 去掉
finally里,ps和con各使用一個try與catch,不要搞到一起。

查看完整回答
反對 回復 2023-01-15
  • 1 回答
  • 0 關注
  • 116 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號