We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Change ID to value String

Hello,

I get a ResultsSet and create DataTable from ResultSet.

But I have in DataTable id to value in another table.

It’s possible get a exactly that ID from dataTable and change value to String?

I can’t use specific sql. I need make changes in a DataTable or another object.

Regards Miro

or I can custom mapping for DataTable or something like that ?

Hi Miro,

Thanks for your inquiry. I have tried to understand your query and as per my understanding, you want to filter records from DataTable and convert integer value to string of specific column.

If this is the case, I suggest you please use CAST and CONVERT method in your sql when you get ResultSet object to convert integer value to string. So, in DataTable the specific column will have string values. Regarding filtering records from DataTable, there is no direct way to find a specific record. You need to iterate through DataTable’s rows and find specific record. You can get the rows of DataTable using DataTable.getRows. Please read the members of DataTable class from here:
https://reference.aspose.com/words/java/com.aspose.words/mailmerge#execute(com.aspose.words.net.System.Data.DataTable)

Hope this answers your query. If this does not help you, please share some more detail about your query. We will then provide you more information about your query.

OK I understand it’s OK,

but now I have a problem because I want make Checkbox from resultSet.

How I can do that ?

All examples in in array - https://reference.aspose.com/words/net/aspose.words.mailmerging/ifieldmergingcallback

How do that in DataTable and ResultSet ?

Hi Miro,

Thanks for your inquiry. You can use the same code shared here to insert check boxes during mail merge. You simply need to pass DataTable object in MailMerge.execute method. Please check the overloaded MailMerge.execute methods from here:
https://docs.aspose.com/words/java/mail-merge-and-reporting/