Image

Imagetalldean wrote in Imagejava_dev

I'm trying to use a CLOB for the first time, using an Oracle 9 JDBC driver connecting to Oracle 9. No other problems with this, at all.

Essentially:

PreparedStatement ps = connection.getPreparedStatement("insert into foo (clob_column) values (?)");
ps.setString(1, "Anything here. At all.");
ps.executeQuery();

Hangs on the executeQuery(). No error. No exception. No nothing, just indefinite hang until the connection times out. I've tried ps.setAsciiStream(1, new InputStream(new ByteInputStream("anything here".getBytes())));, with the same effect.

Should I disregard my DBA's advice, and go with an Oracle LONG instead?