Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Parameterized insertion of data in HANA through JavaScript

$
0
0

That's just the code to test the connection to the database since HANA is new to me and I want to find out how everything works. Later on the goal is to write and retrieve data automatically to the database within a JavaScript application.

The second example has as well the connection commit, I just shortened it in the post:

 

var conn = $.db.getConnection();

var st = conn.prepareStatement("INSERT INTO \"SCHEMA\".\"testTable\" values(?,?)");

st.setString(1,id);

st.setString(2,val1);

st.execute(); 

conn.commit();

conn.close();

 

Trying to run it I get an 'Error 500 - Internal server error'.


Viewing all articles
Browse latest Browse all 9052

Trending Articles



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