cancel
Showing results for 
Search instead for 
Did you mean: 

Procedure Call from .xsjs: Nothing happens in database

Former Member
0 Kudos


Dear all,

I want to call a procedure from an .xsjs file by the following code:

// Executing the call


var conn = $.db.getConnection();
var cst = conn.prepareCall("CALL \"_SYS_BIC\".\"Sentiment_Analysis.models/analyze_messages_v2\"()");
cst.execute();

// Displaying "Hello World" in the browser


$.response.contentType = "text/plain";
$.response.setBody( "Hello, World !");

cst.close();
conn.close();

"Hello World" is displayed in the browser. The procedure should calculate sentiments and write the results in a table. However, nothing changes in the result table in the database.

The procedure has no input or output parameters. When called from the SQLConsole within the HANA Studio, everything works fine. Does anyone see what I am missing?

Cheers

Florian

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Does anyone see what I am missing?

You don't have a commit. You should call conn.commit(); before the conn.close();

Former Member
0 Kudos

Many thanks!

Answers (0)