Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Reading CLOBs with JDBC
Hello,
I've been trying to do CRUD (Create, Read, Update, Delete) functions with JDBC on table with a CLOB field. I've been able to successfully create rows, update and delete them, but when I try to populate a ResultSet with the data from the table I get:
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
According to the Oracle documentation, I need to upgrade Oracle. I am using Oracle 8.0.5.0.0 and it does support CLOBS. Here is the code that I used to insert and read rows:
(**Java 1.1**)
java.sql.PreparedStatement stmt = theConnection.prepareStatement("insert into tbl values(?)");
//***ASRCLOB is a String***
byte[] bclob = new byte[theASRCLOB.length()]; bclob = theASRCLOB.getBytes(); stmt.setBytes(1, bclob); //Execute the INSERT statement. stmt.executeUpdate(); //Execute the SELECT statement OracleStatement stmt2 = (OracleStatement)theConnection.createStatement(); OracleResultSet rs = (OracleResultSet)stmt2.executeQuery("selecttheclob from tbl");
Is the problem with my code or my Oracle setup. All things Oracle on my machine were installed from the 8.0.5 CD, so I don't think there should be any version incompatability problems. Thanks in advance for your help.
Benjamin Powers Received on Thu Sep 23 1999 - 16:21:58 CDT
![]() |
![]() |