A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Pls give me solution to solve "String literal too long" problem:
Joined: Dec 29, 2000
Sep 15, 2002 17:48:00
When I use
to do update to a table in oracle database(the type of updated field is Clob), i got following error:
literal is too long.
Could anyone throw a light on how to solve this problem.
Thanks Soo much.
Joined: Aug 26, 2002
Sep 16, 2002 04:26:00
Usually this happens when one tries to put the field value directly into the SQL statement. Are you using parameters?
.. create Connection conn first pstmt = conn.prepareStatement("INSERT INTO MY_TABLE (ID, CLOB_FIELD_NAME) VALUES ?, ?"); // now set values for the parameters pstmt.setLong(id); pstmst.setString("a really long string");
RefactorIT - Java Refactoring Tool<br /><a href="http://www.refactorit.com" target="_blank" rel="nofollow">www.refactorit.com</a>
It is sorta covered in the
JavaRanch Style Guide
subject: Pls give me solution to solve "String literal too long" problem:
HOMEWORK PROJECT DUE IN 45 MIN - NO IDEA HOW TO START (urgent)
confusion with long
What is the difference in String a = "abc" and String a = new String("abc")
Passing string as arg to main
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015