Skip to Content
0

XSJS read image and strings from table

Dec 02, 2017 at 09:09 AM

85

avatar image

Hi all,

I am trying to access multiple images along with its ID and description. These things combined together doesn't work.

	while (rs.next()) {
	   var record = {};
	    record.id = rs.getString(1);
		record.image = encodeURI(rs.getBlob(2));
		//record.image = " \" " + $.util.codec.encodeBase64(rs.getBlob(2)) + " \" ";
		record.textSize = rs.getString(3);
		record.category = rs.getString(4);
		output.results.push(record);
	}
	var body = JSON.stringify(output);
	$.response.contentType = "application/json;charset=utf-8";

How can i get a response that is of mixed type ( Text + Image)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers