Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: HANA Timestamp issue in XSJS

$
0
0

Issue Solved :

 

 

  • Removed few inconsistent data and
  • Changing the code to below :
var query = 'call \"demoApp.demo01.app01.procedures::sensor_read\"(?,?)';  var cst = conn.prepareCall(query);  cst.setString(1, sensorId);  var rs = cst.execute();  conn.commit();  rs = cst.getResultSet();     while(rs.next()){  data.id = rs.getNString(1);  data.timestamp= rs.getTimestamp(2) ;  data.value= rs.getInteger(3);       }   body = JSON.stringify(data);  conn.close();  } catch (e) {  body = e.stack + "\nName:"+ e.name+"\nMsg" + e.message;  $.response.status = $.net.http.BAD_REQUEST;  }

 

-Ajay


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>