Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

UPSERT in XSJS Issues

Hi Experts

I'm trying to INSERT/UPSERT values into my tables using the following xsjs code

try{

  var conn = $.db.getConnection(); 

  var query ="UPSERT  \"NEO_EZPCFVLMDTZUPGEXJXXXXX\".\"LinkedIN_Connections\" VALUES('x','x','x','x','x','x','x','x','x')";

  $.response.setBody("Success");

  $.trace.debug(query);

  var pstmt=conn.prepareStatement(query);

  var rs=pstmt.execute();

  $.response.setBody(rs);

   conn.commit(); 

}

but i'm getting the following error(p.s I'm using a trial system)

dberror(Connection.prepareStatement): 258 - insufficient privilege: Not authorized at ptime/query/checker/query_check.cc:2547

Tags:
Former Member
Former Member replied

Hi Shahid

The select statement works fine. I have issues with only insert/upsert/delete statements.

Since i'm using the Trial system i believe it is the issue.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question