Ejemplo n.º 1
0
 public void getDescriptionsByCharacterAndIndex(String sCharacter, int index)
     throws SQLException, SAXException, IOException {
   String sSql =
       "SELECT hydc1.description FROM hydc1 AS hydc1, hydc3 AS hydc3 "
           + "WHERE hydc1.gbk = hydc3.gbk AND hydc3.unicode = ? AND hydc1.index = ?";
   PreparedStatement statement = connection.prepareStatement(sSql);
   int i = 1;
   statement.setInt(i++, sCharacter.codePointAt(0));
   statement.setInt(i++, index);
   ResultSet resultSet = statement.executeQuery();
   while (resultSet.next()) {
     controller.setDescriptionByCharacterAndIndex(resultSet.getClob("description"));
   }
   resultSet.close();
   statement.close();
 }