craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
Column Scale/Precision problem printer friendly version
next newest post | next oldest post
Author Messages
rtorres{@}dim.uchile.cl
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

In a column of double/float the displayed number appears ignoring the set column's scale. Moreover, if the number (original from a database) has more decimal digits than the specified in the column's scale it disappear from the cell after clicking. This problem isn't present in the QuickTable2Swing103.

How avoid this problem in QuickTable2Swing11?


admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Please download the latest version. This problem should be fixed. If you still have the problem , let me know.
rtorres{@}dim.uchile.cl
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

The latest version still have the problem.
admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Please try the latest version again from the download section. Make sure you have the latest jar (date Jun 25).

If you still have the problem, set the debug flag as below

yourDBTable.debug=true;

setting debug flag will print the column properties. send me the column properties of the column which has problem. I will have a look at it.

rtorres{@}dim.uchile.cl
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

With the 06/30 version we've got the same problem.

Here's a column with the problem

Column properties (from database), printed with instruction dBTable1.debug=true;
Column 1: Name: Bloq1_Fact_Dem
ReadOnly: true
Data Type: DOUBLE
Precision: 15
Scale: 0
Signed: true

Column properties after changes and printed using column.getXXX();
Column 1: Name: Bloq1_Fact_Dem
ReadOnly : false
DataType : 8
Precision: 15
Scale : 4
Signed : false

Original database value: 29.22767252
Table displayed number on cell: 29.22767252

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Rigo,

I am able to reproduce the problem. This happens whenever the scale
of the data exceeds the scale of the column. I assumed that users will set the
scale based on the data. If the data's scale exceeds the column's scale
, do you want QuickTable to automatically truncate the data?


if you have a data of 0.2711 and if you set the scale to 2, then I
can display 0.27. But the problem is when user tries to change the data
from 0.27 to 0.28, should I update the database with 0.2811? To solve this
complexity, I introduced the DataMap class, the developer decides what
need to be displayed & what should be saved to database.
setscale/setPrecison will be just used for restricting user entering invalid data.


If you just want to format the data to a user readable format, you
should use the class DataMap. This will help to format data of type 1240 to
1,240.00. This will help to preserve the original data. Using this DataMap class
if the scale of the data exceeds the scale of column, you can make a decision, how
exactly you want to dispaly this data.

Ben

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios