Skip to Content
0
Mar 11, 2015 at 06:56 PM

Call procedure with overview from xsjs

30 Views

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