Hi experts,
I create an AdminConn.xssqlcc file. In HANA XS Admin Tool I set the following configration:
And I add the content "anonymous_connection" : "test::AdminConn" in .xsaccesss file.
But I execute the test.xsjs, the error page display:
test.xsjs |
---|
function test() { var body; var conn; $.response.status = $.net.http.OK;
try { conn = $.db.getConnection("test::AdminConn"); var pStmt = conn.prepareStatement("select CURRENT_USER from dummy"); var rs = pStmt.executeQuery(); if (rs.next()) { body = rs.getNString(1); } rs.close(); pStmt.close(); } catch (e) { body = "Error: exception caught"; $.response.status = $.net.http.BAD_REQUEST; }
if (conn) { conn.close(); }
$.response.setBody( body ); } test(); |
The xssqlcc can work, what should I do?
Candy Zhang