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'.