Hi,
I am following opensap course on hana development
when i tried to create the hello world program as mentioned in the course material I am getting an error as follows, while trying to run the program. Please some one can help me on this
The follwing is the code which I copied from opensap
$.response.contentType = "text/html";
var output = "Hello Hana World<br><br>";
var conn = $.db.getConnection();
var pstmt = conn.prepareCall("select * from DUMMY");
var rs = pstmt.execute();
if (!rs.next()) {
$.response.setBody(" Fail to retrieve Data");
$.response.status = $.net.http.INTERNAL_SERVER_ERROR;
}
else {
output = output + "This is the response from My SQL :"
+ rs.getString(1);
}
rs.close();
pstmt.close();
conn.close();
$.response.setBody(output);
The above code is giving me an error as the attached image.
It seems some error in the syntax rs.next()