cancel
Showing results for 
Search instead for 
Did you mean: 

Service exception: [260] invalid column name

rubens12
Participant
0 Kudos

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;


Accepted Solutions (0)

Answers (0)