on 10-06-2017 3:50 PM
Hi Experts,
I had created a procedure and using it on my XSODATA, but when I make a POST request I get the error "Service exception: [260] invalid column name".
Bellow is my xsodata
service {
"_SYS_BIC"."X/CV_X" as "Lacamento"
key("XX")
create using "X::insert_post";
}
My procedure
PROCEDURE "X"."X::insert_post" (
in row "X"."T_TRANSACIONAL",
out error "X"."TT_ERRORRB")
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA "TORSO"
--READS SQL DATA
AS
BEGIN
declare prod string;
declare val integer;
declare band string;
declare e string;
select TOP 1 "PRODUTO", "BANDEIRA", "EC", "VALOR"
into prod, band, e, val
from :row;
if (:prod = ' ' OR :band = ' ' OR :val = 0 OR :e = ' ') then
error = select 400 as HTTP_STATUS_CODE,
'empty field' as ERROR_MESSAGE,
'All fields must be filled' as DETAIL from dummy;
else
INSERT INTO "TORSO"."T_TRANSACIONAL" VALUES (:prod, :band, CURRENT_TIMESTAMP, :e, :val);
end if;
END;
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.