Hi,
In my application I use SAP HANA SP8 db and I use jdk 1.7.
I try to convert Clob to String but I receive the error:
Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [1033]: error while parsing protocol: invalid lob locator id (piecewise lob reading): 0x4988400000750
I try to convert the Clob to String with two method:
1)
public static String clobStringConversion(Clob clb) throws IOException, SQLException
{
if (clb == null)
return "";
StringBuffer str = new StringBuffer();
String strng;
BufferedReader bufferRead = new BufferedReader(clb.getCharacterStream());
while ((strng=bufferRead.readLine())!=null)
str.append(strng);
return str.toString();
}
2)
Clob clob = (Clob) row[IDX_TGKML]; | |
String tgkml = clob.getSubString(1, (int)clob.length()) |
ButI getthe same error
How can I fixthe problem ?
Thanks!!