hi

as i said, i strongly suspect that this is principally a JDBC driver/database issue. the solution i'd recommend is custom formatting in the presentation layer. in the custom tag, i'd suggest checking for values of type Float and then using a formatter than supresses the extra zeros.

- robert

On 22 Jan 2004, at 12:05, Anto Paul wrote:

Hi,
I am using RowSetDynaClass to carry data to JSP. If the field is a
number field and it have 3 digits after decimal it is printing 4 digits the
last one being 0. For eg. instead of printing 1.256 it will print 1.2560.
Please suggest a way so that it won't affect other datatypes this is because
I am using a custom tag to print values in all pages. I am doing this.


ResultSet rs = pstmt.executeQuery();
RowSetDynaClass rsdc = new RowSetDynaClass(rs);
List   list = rsdc.getRows();

In JSP

DynaBean data = (DynaBean)list.get(0);
out.print(data.get("weight"));

Here 1.56 prints Ok while 1.562 prints as 1.5620.

This is with JDK 1.4.1, Oracle 8.1.7. The field type is number(13,3).

Hope this information is enough.
rgds
Antony Paul


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to