on 05-15-2018 4:40 PM
We have an application that we are trying to migrate from Oracle to SAP Hana. Our application calls the creatClob() method whenever we insert clob data into our tables. Whenever the createClob() method is called, we get the following error message.
Caused by: com.sap.db.jdbc.exceptions.SQLFeatureNotSupportedExceptionSapDB: Method createClob() of Connection is not supported.
I am running off of the following driver version:
2.2.6-8c722062a23edf49f36f1af73a5a2c5e70910ee2
Is the createClob feature not supported by ngdbc?
Is there a work around for this?
Is the feature planned for the future?
Thanks for any help
For those interested, I was able to find a work around for this using TO_CLOB. Ill include a link below. Essentially, we use TO_CLOB to create our clob with a PreparedStatement. Store the results into an ResultSet and use getClob to retrieve the our CLOB. I'll include a code snippet.
String s = "Dummy's Clob";
// incon is an parameter
Connection con = incon;
s = s.replaceAll("'","''"); // add in escape sequence for '.
PreparedStatement dummyclob = con.prepareStatement("SELECT TO_CLOB ('" + s + "') FROM DUMMY;");
ResultSet rs = dummyclob.executeQuery();
Clob clob = null;
if (rs.next()) {
clob = rs.getClob(1);
}
return clob;
http://sap.optimieren.de/hana/hana/html/sql_function_to_clob.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.