Call procedure with overview from xsjs
I'm facing a problem when calling a procedure with overview from my web app. See here below the procedure:
create procedure "WEB".save" (in name varchar(100), in lastname varchar(100), out person "PERSON")
SQL SECURITY INVOKER
DEFAULT SCHEMA "WEB"
PERSON = select :name as NAME, :lastname as LASTNAME from dummy;
Using the with overview statement, the procedure should fill the OUT parameter that I'm informing with the result. When I call it from studio directly, works fine:
call "WEB"."save"('Roberto', 'Falk', WEB.person) with overview;
Here, table WEB.person is filled correctly, but when I call it from the xsjs, the table is not filled, and my try / catch in the xsjs file do not shows any errors.
Here how I'm calling from the xsjs file:
var conn = $.db.getConnection();
var pc = conn.prepareCall("CALL \"WEB\".\"save\"('Web1', 'Web2', WEB.person) with overview");
Any ideas? I thought that might be an authorization issue, but the thing is that I'm connected with the same user in both tests.
Thanks and regards,
a conn.commit(); solved the problem. I remembered that studio usually autocommits, so, commiting in the xsjs file solved the problem.