Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Insert values from array - XSJS

$
0
0

for(var j=0; j<output2.length; j++)

  {

  var pstmt4 = conn.prepareStatement("INSERT INTO STUDENT01.HISTORY VALUES(?,?,?,?)");

  pstmt4.setString(1,date);

  pstmt4.setString(2,time);

  pstmt4.setString(3,output2[j]);  // at this line

  pstmt4.setString(4,output);

  pstmt4.executeQuery();

 

 

  }

 

The above code shows an error while inserting. but works without the loop. Am i missing something?


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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