public void insertNewCurrency_Rate(Rate_setInfo info)throws RemoteException{ Connection con = null;PreparedStatement ps = null;StringBuffer strBuff = new StringBuffer();//try{con = Database.getConnection();//啟動(dòng)數(shù)據(jù)庫 //下一行鏈接數(shù)據(jù)庫表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();//關(guān)閉資源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());}}}
如下所示,頁面顯示:服務(wù)器遇到一個(gè)內(nèi)部錯(cuò)誤 (), 無法完成此請(qǐng)求?
蠱毒傳說
2023-01-12 19:15:39