Пример #1
0
 /**
  * Returns the NLS_NChar_Characterset of the oracle database. Used for NCHAR, NVARCHAR2 and NCLOB.
  *
  * @param stmtExecuter <code>StatementExecuter</code> instance to perform the action</code>.
  * @return String declaring the used characterset
  * @exception SQLException Description of the Exception
  */
 private String getNLS_NChar_Characterset(StatementExecuter stmtExecuter) throws SQLException {
   // see
   // http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76966/ch2.htm#97247
   try {
     return stmtExecuter.getSingleRowColAsString(
         "select VALUE from V$NLS_PARAMETERS where PARAMETER='NLS_NCHAR_CHARACTERSET'");
   } catch (SQLException e) {
     throw e;
   } catch (Exception e) {
     throw new DatabaseException(e);
   }
 }