Forums Register Login

Are there any constraints on length of String?

+Pie Number of slices to send: Send
Are there any constraints on length of String, passed to oracle stored procedure using setString method?
+Pie Number of slices to send: Send
What data type are you using, and what precision does it have? There are no limits on a String size in Java, but there are limits on how much data each data type can hold.
+Pie Number of slices to send: Send
I have a String, such as
String value;
And i have a stored procedure. cstmt - is a CalalbleStatement for this procedure, Procedure parameter is VARCHAR2
If I call
cstmt.setString(1, value);
will there be some constraints on the length of my string variable? For example, if my string consists of 20000 chars, can there be problems in passing this string to Oracle proc?
+Pie Number of slices to send: Send
Hi Sergey,

You can pass lengths in callable statement only to ASCII,Binary and character Streams.

Srilakshmi
+Pie Number of slices to send: Send
VARCHAR2 is usually defined with a precision, normally specified as the number of characters which can be held. i.e. VARCHAR2(10). The maximum size is I think 4000 bytes. Notice this is not defined as characters - different character sets will use a different amount of space to store each character.

If you have to store very large amounts of character data, have a look at CLOBs
+Pie Number of slices to send: Send
Thanks, guys!
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
@UniqueConstraint
String length without using String.length() method
questions from java prepare
byte [ ] to StringBuffer
limit in URL rewriting?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:39:15.