on 10-10-2018 8:34 AM
Hello,
I have gone through few blogs for this issue. But did not find any solution.
How to pass the value from XSJS to a table type input parameter in procedure?
XS Callling Stored Proc with multiple values in input param
I am facing issue in procedure while inserting values into the table. Please find the code below.
PROCEDURE "TEST"."insertSales" (
IN SALESDATA "TEST"."test.model.SalesProj::SALES.SalesType" )
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA "TEST" AS
BEGIN
INSERT INTO "TEST"."test.model.SalesProj::SALES.Sales"
(SELECT * FROM :SALESDATA);
END;
I am passing sales data in this JSON format
salesCreate= conn.loadProcedure('TEST', 'insertSales');
rs = salesCreate([{SALESORDER: "1000000001", COMPANYNAME: "Test Comp", PRODUCTID: "Mat1"}]);
Please let me know if I am missing anything here.
Thank you.
Why then not just doing a commit (conn.commit). Using the $.hdb interface the autocommit mode is disabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Florian,
I am sorry. I am not getting any error. But data is not added in the table.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.