You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Jason Mihalick <ja...@jCraftsmen.com> on 2004/08/16 23:50:29 UTC

(Repost) Re: Patch: DB2 BigDecimal problem (truncation occurs and data is lost)

Armin Waibel wrote:

> I local apply your patch to PlatformDefaultImpl and run the test-suite
> against sapDB/maxDB with success.
> So, what do the experts think about it? ;-)
> Apply this patch to PlatformDefaultImpl?
>
I haven't corresponded yet with the other folks that replied to my post, 
but I do think since other folks are seeing the problem in Sybase and 
other platforms that it does indeed belong in PlatformDefaultImpl.  
Also, if you look at the JavaDoc for setObject...

Option 1 -> 
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setObject(int,%20java.lang.Object,%20int) 


vs.

Option 2 -> 
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setObject(int,%20java.lang.Object) 


OR

Option 3 -> 
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setObject(int,%20java.lang.Object,%20int,%20int) 


it's pretty evident that either the 2nd or 3rd option is the proper 
choice here.  That brings up the question, which is the best choice?  
Even though I know that option 2 works for DB2, it does seem like option 
3 is the saftest route to go.  The JavaDoc is pretty explicit for option 
3 about the handling of DECIMAL data types.  So after having reviewed 
this in more detail, my vote would be to go with the patch as suggested 
by Stuart Heriot in the following post:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=ojb-user@db.apache.org&msgNo=13981 



>>
>> This posting, incidentally, did receive some feedbadk from other 
>> users saying that they had seen the same problem.
>>
>
> Do all of them agree apply the patch in PlatformDefaultImpl? Does it
> solve the sybase problem too?
>
Yes, I think the concensus is to go with Option 3 above.

Thanks,
Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org