Executing MaiMerge with ResultSet containing CLOB fails

Hi,

I use AsposeWords to perform a MailMerge with DataSet and ResultSet which contain a CLOB COLUMN as shown here:

DataSet dataSet = new DataSet();
DataTable dtData = new DataTable(rs, "Broschuere");
dataSet.getTables().add(dtData);
InputStream inputStream = getClass().getResourceAsStream(template);
doc = new Document(inputStream);
doc.getMailMerge().executeWithRegions(dataSet);
doc.updateFields();

After doing this with no errors, opening my DOC on the position where the CLOB should be I see the following “oracle.sql.CLOB@5c7088b1”, so the MailMerge past the Pointer and not the value of the CLOB.

can you help me?

thx
Michael

Hi Michael,

Thanks for your inquiry. To insert an image mail merge field into a document in Word, select Insert/Field command, then select MergeField and type Image:MyFieldName. Please make sure that your mail merge field name is like Image:MyFieldName.

If you still face problem, please attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

Hi,
why do you write about images. I never wrote anything about images or something like that. I don’t need to merge a BLOB (byte[]) I need to merge a CLOB which is a VERY BIG VARCHAR field in ORACLE, you know it.

javax.sql.CLOB is a very big VARCHAR represented in ORACLE, and I need to merge the content of THIS VERY BIG VARCHAR to my mergefield, as I do in the code above.

So what do I wrong?

thx
Michael

Hi Michael,

Please accept our apologies for your inconvenience.

We have tested the scenario using CLOB data type and have not found the shared issue. If you are using old version of Aspose.Words, we suggest you please upgrade it to Aspose.Words for Java 15.9.0.

If you still face problem, please share your input template document along with contents of CLOB here for our reference? Please share the contents of CLOB in notepad file. We will investigate the issue on our side and provide you more information.

Still same problem with latestest version of Aspose.Words Java 15.9.0

I create a test client for you with t.docx is the template and r.docx is the result.

Change on Test.java the setUrl, setUser and setPassword to open an connection to your database where you have to do a select from to CLOB columns like in my source code.

If you like here are the database scripts

create table test (short_desc varchar2(255) not
null, long_desc clob not null);

insert into test (short_desc, long_desc) values (‘short1’,
‘long1’);

insert into test (short_desc, long_desc) values (‘short2’,
‘long2’);

commit;

thx
Michael

Hi Michael,

Thanks for sharing the detail. We are working over your query and will get back to you asap.

Hi Michael,

Thanks for your patience. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-1204. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJAVA-1204) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.