Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

display of non-integer numbers in table

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2009, 04:28 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default display of non-integer numbers in table

When I have a SQLite table with a field that is defined as REAL (in the create table SQL) and where all the values in that field are rounded to 2 decimals (update table1 set field1 = round(field1, 2) then when I get that SQLite in a table control (cmd.ExecuteTable etc.) then there will be more than 2 decimals showing in the table control.
The only way to get the 2 decimals and no more is to do another round in the cmd.CommandText.
Is this a bug or am I missing something here?
This is both on the desktop and the device.

RBS
Reply With Quote
  #2 (permalink)  
Old 01-04-2009, 05:32 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The number is stored in the database as a binary number, not a string.
It is possible that the binary representation is not completely accurate. So you get trailing zeroes.
Reply With Quote
  #3 (permalink)  
Old 01-04-2009, 06:36 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yes, that must be it.
Other apps though somehow don't show these extra figures.

RBS
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clock, Table & Textbox won't Display epsharp Questions (Windows Mobile) 2 10-31-2008 11:34 AM
The same random numbers LineCutter Questions (Windows Mobile) 4 10-16-2008 05:05 PM
How do I convert a string to an integer dahljam Questions (Windows Mobile) 4 10-12-2008 07:32 PM
Numbers lock key davelew1s Questions (Windows Mobile) 0 06-14-2008 07:26 PM
Display images in table column chow Questions (Windows Mobile) 1 04-23-2008 11:50 AM


All times are GMT. The time now is 03:38 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0