How to set decimal value in prepared Java message. I was tried as follows
My table query
create table A (x decimal(22,0))
In java, I tried to set it as
preperedStatmentObj.setLong(1,aLongValue);
But I get the following error
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
thanks
source share