Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Sequence nextval supported in prepared statements?

$
0
0

Hi,

 

Have a sequence created, abc.def.data::logId.

 

I am trying to use this in a prepared statement within an xsjs service as follows:

 

 

query = 'INSERT INTO "abc.def.data::log" values(?,?,?,?,?,?,?,?,?,?,?,?)';

pstmt = conn.prepareStatement(query);

pstmt.setString(1,'abc.defl.data::logId.nextval');

 

 

This does not work, as the prepared statement fails "inserted value too large" as it interprets the value of parameter 1 as a string literal.  Without the next val in quotes the editor does not like the string value..

 

Are sequences and the use of nextval for prepared statements supported (AWS Rev 68)?

 

If not I can resort to passing data from the xsjs over to a stored procedure and use standard statements rather than prepared statements.

 

Thanks.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>