Package java.sql

Examples of java.sql.ResultSet.updateNClob()


/*     */   public void updateNClob(int columnIndex, NClob clob) throws SQLException
/*     */   {
/* 520 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 523 */       resultSet.updateNClob(columnIndex, clob);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 527 */       throw checkException(t);
/*     */     }
View Full Code Here


/*     */   public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
/*     */   {
/* 533 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 536 */       resultSet.updateNClob(columnIndex, reader, length);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 540 */       throw checkException(t);
/*     */     }
View Full Code Here

/*     */   public void updateNClob(int columnIndex, Reader reader) throws SQLException
/*     */   {
/* 546 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 549 */       resultSet.updateNClob(columnIndex, reader);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 553 */       throw checkException(t);
/*     */     }
View Full Code Here

/*     */   public void updateNClob(String columnLabel, NClob clob) throws SQLException
/*     */   {
/* 559 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 562 */       resultSet.updateNClob(columnLabel, clob);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 566 */       throw checkException(t);
/*     */     }
View Full Code Here

/*     */   public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
/*     */   {
/* 572 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 575 */       resultSet.updateNClob(columnLabel, reader, length);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 579 */       throw checkException(t);
/*     */     }
View Full Code Here

/*     */   public void updateNClob(String columnLabel, Reader reader) throws SQLException
/*     */   {
/* 585 */     ResultSet resultSet = getUnderlyingResultSet();
/*     */     try
/*     */     {
/* 588 */       resultSet.updateNClob(columnLabel, reader);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 592 */       throw checkException(t);
/*     */     }
View Full Code Here

      Statement stmt1 = conn1.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
      ResultSet rs1 = stmt1.executeQuery("SELECT c1, c2 FROM testUpdateNChlob");
      rs1.next();
      NClob nClob2 = conn1.createNClob();
      nClob2.setString(1, "bbb");
      rs1.updateNClob("c2", nClob2);
      rs1.updateRow();
      rs1.moveToInsertRow();
      rs1.updateString("c1", "2");
      NClob nClob3 = conn1.createNClob();
      nClob3.setString(1, "ccc");
View Full Code Here

      rs1.updateRow();
      rs1.moveToInsertRow();
      rs1.updateString("c1", "2");
      NClob nClob3 = conn1.createNClob();
      nClob3.setString(1, "ccc");
      rs1.updateNClob("c2", nClob3);
      rs1.insertRow();
      ResultSet rs2 = stmt1.executeQuery("SELECT c1, c2 FROM testUpdateNChlob");
      rs2.next();
      assertEquals("1", rs2.getString("c1"));
      assertEquals("bbb", rs2.getNString("c2"));
View Full Code Here

      ResultSet rs3 = stmt2.executeQuery("SELECT c1, c2 FROM testUpdateNChlob");
      rs3.next();
      NClob nClob4 = conn2.createNClob();
      nClob4.setString(1, "bbb");
      try {
          rs3.updateNClob("c2", nClob4); // field's charset isn't utf8
          fail();
      } catch (SQLException ex) {
          assertEquals("Can not call updateNClob() when field's character set isn't UTF-8",
                  ex.getMessage());
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.