Skip to Content
0

Service exception: [260] invalid column name

Oct 06, 2017 at 02:50 PM

85

avatar image

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;


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers