Results 1 to 3 of 3

Thread: QSqlQuery and rounding off of data

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: QSqlQuery and rounding off of data

    My guess would be that "ROUND" just rounds the value and does not convert it to a string.
    So the type of the value is still a floating point number and the values you get are the closest possible to the rounded values.

    Again assuming that ROUND does not create a string, then that is missing from your query.

    Cheers,
    _

  2. #2
    Join Date
    Oct 2009
    Location
    South Africa
    Posts
    94
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: QSqlQuery and rounding off of data

    That makes sense.
    I formatted it in my code anyway now, so doesn't matter anymore.
    Thanks for the reply.

Similar Threads

  1. Replies: 5
    Last Post: 26th April 2016, 18:59
  2. Replies: 5
    Last Post: 6th April 2016, 20:31
  3. QSqlQuery poor performance retrieving data
    By croscato in forum Qt Programming
    Replies: 7
    Last Post: 18th November 2014, 17:22
  4. Replies: 1
    Last Post: 20th May 2009, 20:36
  5. Replies: 2
    Last Post: 27th April 2009, 15:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.