Sap DB wrote
> 
> hi,
> 
> I have got troubles with an update using parameter and negative value:
> 
> 
> 
> running the following statement
> 
> UPDATE DBM350_SM SET StatusCode=-2, DIST_FILE=?, 
> DIST_NUM=DIST_NUM+1 WHERE
> MSN=30 AND (DIST_OWNER IS NULL) AND DIST_NUM=11
> 
> I got the message "Numeric value out of range;-3019 POS(1) Invalid
> exponent."
> 

I could reproduce that problem. But it does not matter if there is a
positive or negative value given for StatusCode, the reason is
that if
* a LONG-column is updated   +
* another non-key-column is updated, but not with a literal or ? or :parameter, but
  with something that has to be calculated (+1, or function around or something like 
that)
then something is written to a place where something else is expected
--> different funny errors may occur, -3019 you saw, -3016 I saw,
it just depends on the datatype of the non-key-column updated and the value
stored at that memory space.

The workaround is: you have to separate this update into two, sorry.
Thank you for reporting. The bug will be fixed with the next version,
see PTS 1124113

Elke
SAP Labs Berlin


> 
> 
> I have tried the same statement with a positive value for 
> StatusCode and it
> works, and I have tried a statement without DIST_FILE and it works.
> 
> NOK--> UPDATE DBM350_SM SET StatusCode=-2, DIST_FILE=?, 
> DIST_NUM=DIST_NUM+1
> WHERE MSN=30
> 
> OK--> UPDATE DBM350_SM SET StatusCode=2, DIST_FILE=?, 
> DIST_NUM=DIST_NUM+1
> WHERE MSN=30
> 
> OK--> UPDATE DBM350_SM SET StatusCode=-2, DIST_NUM=DIST_NUM+1 
> WHERE MSN=30
> 
> 
> 
> I'm using the ODBC driver build 027-123-048-452
> 
> the table is create like : CREATE TABLE DBM350_SM (MSN SERIAL 
> PRIMARY KEY,
> StatusCode INTEGER, DIST_FILE LONG BINARY, DIST_NUM INTEGER)
> 
> 
> 
> If someone has any idea...
> 
> 
> 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to