Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with JDBC and LONG column type
I am trying to insert a string > 2000 characters into a table using JDBC connecting to an Oracle 7.3.2 database.
I have a table of 10 or so columns, one of which is of type "LONG", which should be able to store "variable length character strings containing up to 2 gigabytes..."
I can only use a 2000 character quoted string, however, so I'm not able to insert anything over 2000 characters into the table. I'm just doing a plain vanilla insert, like:
String query = "insert into long_table(key,long_column) values('thekey','a very long text string of user input'"; try {
Statement stmt = dbconn.createStatement(query);
stmt.executeUpdate(query);
dbconn.commit();
stmt.close();
} catch(SQLException) .... you get the point.
I've also tried using a PreparedStatement in the hopes that since they are "compiled" (precompiled, I think) they wouldn't be subject to the length requirement.
Can anyone help me figure out how to insert a string > 2000 characters with JDBC?
Thank you!!!
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Jun 11 1999 - 15:48:43 CDT