Conversion error on host variable or parameter *N

Richipal picture Richipal · Sep 10, 2009 · Viewed 14.3k times · Source

I am getting this Error on Insert statement to AS400 database, using Java with JDBC.

Answer

Richipal picture Richipal · Sep 10, 2009

I figured it out, I had a numeric field with length 4 and decimal digits 2, In my insert I was trying to insert 100 in this numeric field which gave this error.

I altered the table and made it numeric with length 9 and decimal digits 2 
and the insert worked.

even though the error says "Conversion error", actually its the wrong field length.