Hello Guy.
Thank you for your reply but I already tried to make a type handler but does
not work.
I have to retrieve data reproducing this code:
Connection c = DriverManager.getConnection(user, user, pwd);
Statement createStatement = c.createStatement();
((OracleStatement)createStatement).defineColumnType(1,
Types.LONGVARBINARY);
ResultSet rs = createStatement.executeQuery("SELECT
xmltype.getclobval(MY_COLUMN) FROM MY_TABLE);
If I don't set defineColumnType to LONGVARBINARY before running the query
read data are corrupted.
Oracle site says:"BLOB or CLOB data can be read and written using the same
streaming mechanism as for LONG RAW and LONG data. BFILE data can be read
using the same streaming mechanism. To read, use defineColumnType(nn,
Types.LONGVARBINARY) or defineColumnType(nn,Types.LONGVARCHAR) method on the
column. This produces a direct stream on the data as if it were a LONG RAW
or LONG column. This technique is limited to Oracle Database 10g release 1
(10.1) and later."
Gianni Santo
--
View this message in context:
http://mybatis-user.963551.n3.nabble.com/how-to-defineColumnType-Oracle-statement-tp4027239p4027248.html