Posts Tagged ‘database’

Usando la siguiente función DBMS_UTILITY.GET_TIME. ya que devuelve la hora actual en centésimas de segundo.

Share

Clob to String

Posted: 24th May 2011 by Jak in Database, Java, Oracle
Tags: , ,

Para convertir un dato tipo clob a otro tipo string en java se pueden usar varias formas: 1.- La mas simple: rs.getClob("campo").getSubString(1,(int)rs.getClob("campo").length()); 2.- Con un metodo: public static String clobStringConversion(Clob clb) throws IOException, SQLException { if (clb == null) return ""; StringBuffer str = new StringBuffer(); String strng; BufferedReader bufferRead = new BufferedReader(clb.getCharacterStream()); while ((strng=bufferRead […]

Share