
Hello Phat, On 04/09/2014 10:11 PM, Phat Loc wrote:
I am not able to get Blob and Clob to work in JDBC v 2.10? I get a SQLFeatureNotSupportedException? Is this the correct behavior?
sql>create table clobtest (a clob); operation successful (104.179ms) sql>insert into clobtest values ('adsf'); 1 affected row (9.055ms) sql>select * from clobtest; +------+ | a | +======+ | adsf | +------+ 1 tuple (0.766ms) If I connect to that using JDBC with the following program package test; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class TestCall { public static void main(String[] args) { try { Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); Connection con = DriverManager .getConnection("jdbc:monetdb://localhost:50000/acs", "monetdb", "monetdb"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select a from clobtest"); if (rs.next()) System.out.println("JDBC Result: "+rs.getClob(1)); } catch (Exception e) { e.printStackTrace(); } } } I get JDBC Result: adsf From what I can see, this should work. Perhaps you can share more details on what you are doing. Also, if you append ?debug=true to the JDBC URL (e.g. jdbc:monetdb://localhost:50000/acs?debug=true in the above example), the JDBC driver produces a log file that help us tell what is going on. Best, Hannes