Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

oData Update Support

$
0
0

Hi Experts.

 

I was following the video( http://www.youtube.com/watch?v=c41anxrDleg ) on how to use store procedures to update HANA DB. I managed to get the stored procedure activated, but when I added the extra line to my oData service, I get the following error:

 

      casper/services/oDataService.xsodata

           Invalid procedure or parameter list in procedure

"casper.Exercise.procedure::updateMethod".

 

 

-- the store procedure

CREATE PROCEDURE updateMethod (

in row "casper.data:Table" )

          LANGUAGE SQLSCRIPT

          SQL SECURITY INVOKER

          DEFAULT SCHEMA "MYSCHEMA"

 

           AS

BEGIN

/*****************************

          Write your procedure logic

*****************************/

  

declare lv_AB nvarchar(2);

declare lv_CD nvarchar(15);

 

select "AB", "CD" into lv_AB, lv_CD from :row;

 

update "casper.data::Table" set "AB" = lv_AB where "CD" = lv_CD;

 

END;

 

-The oData service

service namespace "casper.services" {

 

"MYSCHEMA"."casper.data::Table"

      as "MyTable"

      update using "casper.Exercise.procedure::updateMethod";

 

}

 

Would anyone know, why is this invalid? I set up the parameter sqlscript_mode to UNSECURE to make the procedure non-read only.

 

Thanks a lot!

 

Casper


Viewing all articles
Browse latest Browse all 3523

Trending Articles