Skip to Content
0
Former Member
Sep 05, 2013 at 02:27 PM

XS Engine SQL Update doesn't write to DB

39 Views

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