Skip to Content

InternalError: dberror(setString): 339 - invalid number: not a valid number string

Hello all,

I created a simple XSJSLIB with oData custom exit in HANA XS Classic and write a code to insert the date into database.

Date type in table is defined as:

{name = "CREATTION_DATE";  sqlType = DATE;  comment = "Creation Date- YYYYMMDD";},

Here is the code in XSJSLIB:

query = "INSERT INTO \"COMMON\".\"PROD.TEST.TABLE::TEST\" (DATE) VALUES(DATE) "; 
pStmt = param.connection.prepareStatement(query);  
pStmt.setString(1, '2020-07-16');
pStmt.executeUpdate(); 
pStmt.close();

I am getting this error :

Create Entity failed: :Service exception: [2] InternalError: dberror(setString): 339 - invalid number: not a valid number string '2020-07-16' (line 73 position 1 in /TEST_SUBMITDATA.xsjslib)

Any idea how to fix it? Appreciate.

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers