Hi Guys,
I have this code of creation of Hana XS Application.
$.response.contentType = "text/html";
var output = "Hello, " + $.session.getUsername() + " <br><br>";
var conn = $.db.getConnection();
var pstmt = conn.prepareStatement( "SELECT CURRENT_USER FROM DUMMY" );
var rs = pstmt.executeQuery();
if (!rs.next()) {
$.response.setBody( "Failed to retrieve data" );
$.response.status = $.net.http.INTERNAL_SERVER_ERROR;
}
else {
output = output + "This is the response from my SQL. The current user is: " + rs.getString(1);
}
rs.close();
pstmt.close();
conn.close();
$.response.setBody(output);
Hello, User123,
This is the response from my SQL. The current user is: User123
This works fine .
But I need to fetch the data from my real Hana Tables with this schema and table name "Product_Copy"."Test1".
I am not able to find any relevant help from Hana documents for that.
kindly help me with the code for that...