cancel
Showing results for 
Search instead for 
Did you mean: 

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

ferrygun18
Contributor
0 Kudos
210

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.

Accepted Solutions (0)

Answers (0)