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

xssqlcc can not work

$
0
0

Hi experts,

 

I create an AdminConn.xssqlcc file. In HANA XS Admin Tool I set the following configration:

xssqlcc.jpg

 

And I add the content    "anonymous_connection" : "test::AdminConn"   in .xsaccesss file.

 

But I execute the test.xsjs,  the error page display:

error.jpg

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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