Background
Oracle field type VARCHAR2 Maximum length 4000, what to do
Solve
Use CLOB type, large print segment, no length limit
Problem
The CLOB type obtained by using the Java JDBC Read RS is not working properly, encapsulating the Rs.getobject (). If the field content is determined to be a string, how do you read the string normally? Not changing the encapsulated data acquisition method?
Scheme
Detection items, synthetic string large, enable CLOB, special processing CLOB Jcxmclob = (CLOB) zxkbpzlist.get (Prodectindex). Get ("JCXM"); String jcxmstr = jcxmclob.getsubstring (1, (int) jcxmclob.length ()); list<string> jcxmlist = arrays.aslist (Jcxmstr.split (","));
Attention:
1, my database is Oracle, GU clob application oracle.sql.* content
2, substring starting subscript is 1
End.
May 3, 2018 at Yat Chui Garden, Xian, phase two
Zhang Li
Every day is learning, such as the flow of time.
"Original" Using Java for CLOB to string string