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

XS Engine SQL Update doesn't write to DB

$
0
0

This is the important code:

conn = $.db.getConnection();

var query = "UPDATE \"LASVEGAS\".\"lasvegas.data::listener\" SET \"isActive\" = '0'  WHERE \"ID\" = ?";

var pstmt = conn.prepareStatement(query);

pstmt.setString(1, listener_id);

var updateCount = pstmt.executeUpdate();

$.response.contentType = "text/html";

$.response.setBody("Success!<br />"+updateCount+" rows affected.");

$.response.status = $.net.http.OK;

 

I run it on XS engine and get "Success! 1 rows affected." as a result. But when I look to the DB, nothing changed. If I run the exact same SQL query in the SQL console in HANA Studio it works. I'm always using the same user....


Viewing all articles
Browse latest Browse all 6412


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