on 03-11-2015 6:56 PM
Hi Experts,
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")
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA "WEB"
AS
BEGIN
PERSON = select :name as NAME, :lastname as LASTNAME from dummy;
END;
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");
pc.execute();
pc.close();
conn.close();
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,
Roberto Falk
Hi All,
a conn.commit(); solved the problem. I remembered that studio usually autocommits, so, commiting in the xsjs file solved the problem.
Thanks anyway.
Best regards,
Roberto Falk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.