Skip to Content

XSJS read image and strings from table

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)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers